Asset - Scripts Say goodbye to ugly alarm solutions - literally write "execute in 2 seconds" or "execute every 10 frames" with this asset


With our asset, this is now valid Game Maker code:
That's what I literally wrote as code to make an image spin.

Also, let's say your player is attacked and you want him to be invincible for one second - this is how you do it with our asset:
Previously, you had a number of options, most of which require you to create a new event (e.g, an alarm), do something, disable the alarm again etc. Or worse, you might have to check if the right amount of time has passed in your Step-event. That just leads to unmaintainable and ugly spaghetti code.

Look at how beautiful it looks with our asset called "Muffel"! You literally tell it what to do in plain english. There are two ways to use Muffel:
  • periodic execution via "execute every x frames/seconds": let your code run repeatedly at a given time interval
  • delayed execution via "execute after x frames/seconds": let your code run once after some time has passed
Thanks to new features in Game Maker 2.3, it's now possible to use functions just like in JavaScript and other modern languages, which allowed me to design a script that lets you do the above. If you know Unity, you may have heard of Coroutines (StartCoroutine, WaitForSeconds, via yield, etc.), you can basically solve many of the same problems with this asset in Game Maker.

The syntax above was designed via the macro system. Yes, we basically abused macros to get a new syntax, but it looks so nice! :D

Download: Get it here for free! (requires GM 2.3)​

Although there is a README included, I'm working on a documentation with more examples and solutions to common problems - will update soon.

Hope you are as excited about this as I am!