SetDelayScript
From Spheriki
Run a script after a certain frame delay.
Contents |
Usage
- frames number, non-negative. The number of frames to wait before calling script.
- script string. The JavaScript code to run after frames wait.
Examples
To wait a short amount of time before changing to another map:
SetDelayScript(60, "ChangeMap('forest.rmp');");
This will change the map about one second after the SetDelayScript() call was encountered. The exact time will vary according to the map engine refresh rate.
Notes
- The script to be run needs to be a string containing some code, not just code itself.