spawn()
proc/act()
for()
if(health<=0) break
Problem description:
SO I was wondering, because I'm trying to make AI for while the zombie is still alive, what exactly does that error mean because I want to get this fixed.
ID:140064
![]() May 22 2010, 2:40 pm
|
|
Code:
spawn() Problem description: SO I was wondering, because I'm trying to make AI for while the zombie is still alive, what exactly does that error mean because I want to get this fixed. |
Thanks, I appreciate that, but what I'm trying to do is make it so that the NPC acts while it still alives as if it were a zombie, so how can I do that?
|
mob/NPC/Zombine If you still don't understand why this code would compile and yours didn't, then you have to read the guide. |
Thank you sir, I have been reading the guide just not following it while coding, just been using what I've learned and remember.
|
Well actually, how can I make a loop that works as the mob is still alive, but it doesn't necessarily have to call a proc?
|
CodeWeasel22 wrote:
Well actually, how can I make a loop that works as the mob is still alive, but it doesn't necessarily have to call a proc? A loop that doesn't necessarily call a proc would be a (potentially) empty loop, which will effectively lock up your game. Presumably you mean something else, but I really can't imagine what. |
You however can call an existing proc by writing its name with parentheses in the end.
Note that if you have a simple breaking condition, you shouldn't set up an infinite loop and use break. Use the condition part of the loop constructs (for()'s 2nd arg and while()'s only arg).