Reply to Wait times
If you don't have an account, just leave the password field blank.
Not sure if this has been discussed before, but something in this document that stands out is the following line:
In fact, wait(0) is effectively the same as wait(1), and both have an effect.
Although the basics of the game loop are explained, the wait system is never really examined, leading to a slight degree of mysticism surrounding it.
Script suspension works by storing the state of the script in a big list which is then checked every engine iteration before the frame is drawn to the screen. If the amount of specified (real) time has passed or has been exceeded, the script is resumed from where it left off. Typically, the slowest part of a single iteration is frame-drawing, which you can check in yedink is around 16 milliseconds, assuming you're at 60FPS. Which you should be, unless you're having fun with the frame limiter.
What this means is that if you have a wait of 1, the time that the script will be resumed will be 1 millisecond from the time of invocation. Of course, if it takes 16ms to render a frame, it will be resumed upon the next iteration, as will any wait of 16 milliseconds or less. Therefore, any waiting durations from 1 to 16 are equivalent to zero.
Durations of 17 to 32 will resume after two frames, meaning 17 to 31 are equivalent to 32 and so on and so forth *sniffs*. For short waits, it may be worth considering just how many individual frames you're attempting to skip before resumption.
In fact, wait(0) is effectively the same as wait(1), and both have an effect.
Although the basics of the game loop are explained, the wait system is never really examined, leading to a slight degree of mysticism surrounding it.
Script suspension works by storing the state of the script in a big list which is then checked every engine iteration before the frame is drawn to the screen. If the amount of specified (real) time has passed or has been exceeded, the script is resumed from where it left off. Typically, the slowest part of a single iteration is frame-drawing, which you can check in yedink is around 16 milliseconds, assuming you're at 60FPS. Which you should be, unless you're having fun with the frame limiter.
What this means is that if you have a wait of 1, the time that the script will be resumed will be 1 millisecond from the time of invocation. Of course, if it takes 16ms to render a frame, it will be resumed upon the next iteration, as will any wait of 16 milliseconds or less. Therefore, any waiting durations from 1 to 16 are equivalent to zero.
Durations of 17 to 32 will resume after two frames, meaning 17 to 31 are equivalent to 32 and so on and so forth *sniffs*. For short waits, it may be worth considering just how many individual frames you're attempting to skip before resumption.