Script Reference
Scenes & Game


 function (script ; loopcount ;asap)     //Advanced

Used for : Anything.

Parameters :


Description :

Runs a script without starting a cutscene mode, the game will continue normally. Can be used to perform various calculations. If no second parameter is provided the script will run only once.


If you enter a * or the word infinitly the function will loop until it is stopped with  stopfunction.
If you enter loop2 the function will act like a  loop2 event of a roomscript.

A looping function is processed once every frame of the game. Therefore 50 loops take 1 second to be processed.
This means a function in pacdk does usually not work like a loop in a programming language. If you want the game to process all loops immediatly you can enter "asap" as a third value.

[Variabels] can be used as parameter.