FANDOM


This article is a stub. You can help the Game Maker Wiki by expanding it.

Sleep Edit

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.

Usage Edit

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.

Code Edit

In GML Sleep exists as follows:

sleep(milliseconds);

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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.