Quote:
Originally posted by cell424
Very True. while isnt the best thing to use when using a script. You would have to set a flag and then use while (flagname) {script here; } and when you dont want it to loop any more unset the flagname.
|
not really....
flag just means an event to call it.
NPC Code:
i=0;
while (i<10){
commands;
i++;
}
is same as
[code]
while (i=0;i<10;i++

{
commands;
}
[/codes]
its just a lengthier version

same as
NPC Code:
if (i<10){
this.var=this.var+1;
}else this.var=0+1;
same as
NPC Code:
this.var=this.var%10+1;