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