Question about Utility.Wait()

Post » Mon Feb 24, 2014 2:13 pm

Will the wait utility pause the script entirely, or only within its Event Block?

If I have an event onhit() and a wait 5 seconds in there, and then I have an event OnUpdate later, will the OnUpdate be delayed 5 seconds too?

Thank you.

User avatar
Je suis
 
Posts: 3350
Joined: Sat Mar 17, 2007 7:44 pm

Post » Mon Feb 24, 2014 9:38 am

Wait only pauses the current thread of your script. Once a function/event starts waiting, any other functions or events in the queue will be processed while it waits. In other words, the rest of the script will continue running, receiving events (so for instance, you may get more OnHit events triggered while the first is waiting), performing functions, etc.

User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Mon Feb 24, 2014 4:30 am

Thank you.

User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm


Return to V - Skyrim