• 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 Space Rocks Tutorial -- Question about using alarm[ ] in objects

F

floatingonthewater

Guest
Hi Everyone,

I've been following along with the Space Rocks Tutorial and have a question about alarms.

In the tutorial the instructor makes an alarm in obj_game, then calls that alarm in the collusion event of obj_ship. This works just as it should, but I was experimenting with creating the alarm in the obj_ship, but was confused as to why I couldn't get it to work.

Image #1: alarm[1] was created in obj_game (not shown), and works just fine when called.
Screen Shot 2020-09-16 at 10.53.07 PM.png

Image #2: The alarm was created instead in obj_ship, but for some reason it doesn't work.
Screen Shot 2020-09-16 at 10.45.35 PM.png

Could anyone clarify? I also tried with(obj_ship) in the second example to see if that would help, but no luck.

Thank you!
 
Last edited by a moderator:

TailBit

Member
When you destroy the ship, then its timers goes along with it

Edit: when you destroy it then you could create a object that should respawn the ship with a timer it sets in the create event
 
Last edited:

Nidoking

Member
Look about two lines down from where you set the alarm in the obj_ship. See that instance_destroy()? Which instance do you think it destroyed? You just set an alarm, then destroyed the alarm clock.
 
Top