Post your scripting questions / solutions here
Moderator: Moderators
matt_moh
Sergeant
Posts: 65 Joined: Sat Feb 08, 2003 12:04 am
Post
by matt_moh » Tue Apr 08, 2003 6:59 pm
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?
bdbodger
Moderator
Posts: 2596 Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:
Post
by bdbodger » Tue Apr 08, 2003 8:31 pm
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
matt_moh
Sergeant
Posts: 65 Joined: Sat Feb 08, 2003 12:04 am
Post
by matt_moh » Tue Apr 08, 2003 8:42 pm
Thanks, it works fine now.
Angex
Major
Posts: 293 Joined: Mon Dec 30, 2002 1:23 pm
Contact:
Post
by Angex » Tue Apr 08, 2003 8:58 pm
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.