Thread: [Tutorial] Random questions thread
View Single Post
Old 04-18-2012, 04:19 PM   #141   Add To Ignore List  
Werebull
 
NHunter's Avatar
 
Joined: Feb 2012
 
NHunter is offline
Default Re: Random questions thread

A question to all lua guru: how can I set up several monsters (4 entities, 25 spawnees each) as a single boss? Or this is impossible?
At least, as far as I remember, it's possible to set multiple spawnees entity as boss.

Before anyone suggest this, such code doesn't work:
Code:
-- kleers : CLeggedCharacterEntity
local kleers = Kleers -- Kleers is a group variable for 4 entities
worldInfo:RegisterBoss(kleers, "")
gives the following error:
Code:
 Lua error: [Script entity id = 4925 (FinalFightScript)]:53: Invalid argument (1)! Object table expected!
 Lua stack traceback:
     [C]: in function RegisterBoss
     [Script entity id = 4925 (FinalFightScript)]:53: in function <[Script entity id = 4925 (FinalFightScript)]:33>
-----------------------------------

EDIT: For some reason, if I change the code to the following:
Code:
-- kleers : CLeggedCharacterEntity
local kleers = Kleers -- Kleers is a group variable for 4 entities
worldInfo:RegisterBoss(kleers, "some_text_here")
There is no error anymore, but still there is no health bar that I want to have.
__________________
NHunter | NH | 夜狩猟家 | 灰色天使

Last edited by NHunter; 04-18-2012 at 05:10 PM.
  Reply With Quote