Page 1 of 1
Scripting Question
Posted: Tue Apr 08, 2003 6:59 pm
by matt_moh
I have a question about writing a script. Is there a way that I can have a thread stop and wait until a certain statement is true, such as level.x = 1 and then continue on with the rest of thread once that statement becomes true?
Posted: Tue Apr 08, 2003 8:31 pm
by bdbodger
while (level.x != 1)
waitframe
while level.x not equal 1 wait 1 game frame or if that causes a command overflow wait longer but I think that will be ok
Posted: Tue Apr 08, 2003 8:42 pm
by matt_moh
Thanks, it works fine now.
Posted: Tue Apr 08, 2003 8:58 pm
by Angex
Depending on what you're trying to do, you may be able to use the waittill command, which would be more effeicent that the loop.