Skip to content
/ Timers Public

An implementation of both setTimeout and setInterval from JS in GameMaker Studio 2.3

License

Notifications You must be signed in to change notification settings

nommiin/Timers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timers

An implementation of both setTimeout and setInterval from JS in GameMaker Studio 2.3

Usage

  1. Copy setTimeout, setInterval, and setManager into your project
  2. Create an instance of the setManager at game start (alternatively, call __INTERVAL_UPDATE__ and __TIMEOUT_UPDATE__ every frame)
  3. Create an timeout or interval using setTimeout/setInterval respectively
  4. Use clearTimeout/clearInterval to stop them from running

Extra

  • Callback functions have an arguments variable which is an array of arguments that are passed to the callback from the inital setTimeout/setInterval functions
  • setTimeout/setInterval return a numerical ID which can be passed into clearTimeout/clearInterval to stop them from running

About

An implementation of both setTimeout and setInterval from JS in GameMaker Studio 2.3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published