SLUDGE

Unfreezable Functions


Normally when the freeze command is called, all running functions are paused (with the exception of the function from which the freeze command was called).

It is possible, however, to define a function which will not be paused by the command. This can be useful for functions which fade music in or out, provide trails for a mouse pointer, spin a logo in the corner of the window and so on... If a player goes to an inventory screen while music is fading in or out, for example, the music should continue to fade even though other functions (animated backgrounds, conversations, timers for delayed events) should be paused.

In order to make an unfreezable function, simply add the reserved word unfreezable before the name of the function, as shown here.

sub thisSubCanBePausedUsingFreeze () {
}

sub unfreezable thisSubCannot () {
}

See also:

unfreeze