

What UNSAFE does is remove all of the above pre-emption conditions except for the first one, and allows the third to be tuned. The problem with this pre-emption is that it can make some otherwise simple tasks take forever if they use loops or lots of IF's, making loops impractical for some things. Intensive scripts can still slow the game down by the processing they must undertake, but in general the game keeps going.

This is done 100% on purpose to limit the script engine's ability to affect the game's speed. Takes a minimum of 50 seconds to execute, since every time LOOP is encountered the execution pointer's position is popped from the stack (to point it back at the DO) and this triggers the pre-emption in the executive. This means they then wait for the next tick (or in the case of latent functions, the next game loop) to continue execution, since a tick is 1/20th of a second this is a long time. Most often in practice, it's the first and last condition which cause a script to yield.

