Scripting Question

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Scripting Question

Post 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?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Post by matt_moh »

Thanks, it works fine now.
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post 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.
Post Reply