• 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!

[SOLVED] Alarm loop quits

J

jana

Guest
I have an alarm loop that runs approximately 25-30 times, then just quits. I've used alarm loops before with no problem.

Here's how I set it up in this program that quits after a while:
http://www.screencast.com/t/nByb9BYfMC

Here's the set up for when the alarms goes off:
http://www.screencast.com/t/HQlz5p3ovHRC

What could be causing it to stop? DId I miss something? The reason I know the alarm loop is stopping is that I'm printing a text message to the compile window in the two parts of the loop while the game is running, so I can see this object simply drops out, and the game action also reflects that the object dropped out.
 
C

CedSharp

Guest
I can only see 2 things that might stop the alarm:

1. Is the instance in the room destroyed at some point? The alarm would stop running if the object gets destroyed.

2. Is the variable that you are using, 'global.deliveryTiming', changed during the game? If it reaches 0 or a huge number, the alarm might stop running, or at least take longer before it triggers.

Sorry I can't say much more since you didn't show anything else than 'piece of code' and 'set alarm0 to room_speed*global.deliveryTiming'.
 
J

jana

Guest
Thanks, I'll give those things a try. The more I look at my post, the more I realize it's pretty hard to get online help on this one. I'd have to post my whole game. I'll post here when I think I have it solved.
 
J

jana

Guest
It turns out that these lines I added for debugging:
Code:
show_debug_message("a_value_I'm_watching = " value);
were the problem. I removed all of them, and the loop doesn't quit anymore.
 
Last edited by a moderator:
Top