• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Cancelling multiple alarms

pixeltroid

Member
So I have an object that works on a series of alarms - Alarm #1,2,3,4,5,6 and 7. Each one triggers the next with #7 triggering #1, so the object runs through a nice loop.

But when a certain collision happens, alarm #8 is triggered. That causes something else to happen. When that plays out it triggers alarm #1 so the loop from alarm #1 to 7 starts playing again.

But when alarm #8 is triggered, it could be that any of the 7 alarms could be in play. How do I cancel alarms 1-7 at the same time and befoe setting off alarm #8?

Any help would be appreciated!
 
Yeah, so this is just a simple loop that changes i from 0 to 7, which lets you use i as the alarm number (instead of manually typing alarm[0], alarm[1], etc). If you set an alarm to 0, it will cause the alarm to trigger it's associated code, but if you set it to -1, it effectively "cancels" that alarm without the associated alarm code being triggered.
 
Top