Wait
Pauses for a time; coroutines carry on meanwhile.
Wait ( [seconds#] )
Parameters
- seconds# (optional)
- how long to wait, in seconds; 0 for just until the next frame.
Description
Pauses for a time. In a coroutine, only that coroutine pauses: the rest of the program, and the other coroutines, carry on, and it picks up where it left off once the time is up. In the main program, Wait pauses the program while the coroutines carry on running.
With no time, or 0, it waits for the next frame: a coroutine that moves something a little and then Waits each time round a loop moves it smoothly, one step per frame.
Example
Function Blink(light) Repeat ShowEntity light : Wait 0.5 HideEntity light : Wait 0.5 ForeverEnd Function
