wTimer for GameMaker
wTimer v2.1.3
wTimer is a library that offers a more robust alternative for GameMaker's built-in alarms.
With this library, you can create timers that run a specific function after a certain amount of time. This is very similar to GameMaker's built-in alarms, but instead of relying on separate actions, you can just use your own methods, meaning you can declare timers and what they do in a single script, or even a single line if you so choose!
The usage of this library is very similar to Javascript's "setInterval()" and "setTimeout()" methods, so if you're familiar with those then you should feel right at home.
This library was only tested on Windows, HTML5, and GXC targets, but it should work on other platforms as well. It also comes with an example project that will show you the basics.
Since I made this library primarily for my own personal projects, I will keep updating it on a regular basis.
This library is made by Mors (Website | Patreon).
Basic Usage
callback = function() { show_message("Pretty cool, huh?"); } timer(callback, 300); timer(function(){show_message("Forever repeating timer.");}, 60, true);
To learn about how to use the individual functions please give the API Reference a look.
License
The main script for the library (the "scr_wtimer.gml" file) is licensed under MPL 2.0. You can learn more about it here, with Q8 being the most relevant part for most game developers. The rest of the repository is licensed under public domain.
Changelog
You can view the full changelog on GitHub.
If you have any questions, you can ask them in the comments section down below, or create an issue in this library's GitHub repository.
Download
Click download now to get access to the following files:
Development log
- v2.1.3 UpdateMar 31, 2022
- v2.1.2 UpdateNov 09, 2021
- v2.1.0 (and v2.1.1) Update!May 25, 2021
- v2.0.0 Update!!!Mar 12, 2021
- v1.3.1 Update!Oct 02, 2020
- v1.3.0 Update!Sep 27, 2020
- v1.2.0 Update!Aug 28, 2020
- Finally works on HTML5Aug 18, 2020
Leave a comment
Log in with itch.io to leave a comment.