THIS IS NO LONGER AVAILBALE IN LATEST VERSIONS OF GAME MAKER
This Sleep Action, found under the Timing tab, pauses execution of your game for the specified number of milliseconds. It completely pauses the game, halting the executable internally.
To add the action, drag it from the action tab into the action list on your object. A dialog will appear asking you for how long the action will keep the game paused, and whether or not to redraw the game. For example if you put 1000 into the milliseconds field the Sleep action will be active for 1 second.
In GML Sleep exists as follows:
Additional Notes Edit
- Whilst the game is paused under the Sleep action, your game will not respond to input, or even run any scripts.
- Sleep is useful for making a slight pause if the player collides with an enemy before resetting the level, or wherever else a slight pause is needed.
- Pausing the game using this function is not recommended as you'll not be able to un-pause the game until the number of milliseconds has elapsed.