• 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 Character doesn't respawn in Space Rocks tutorial

zee86

Member
obj_ship: Event Alarm 1

GML:
room_restart();
obj_ship: Collision obj_asteroid

GML:
// GameMaker Language Preview (Read-Only)

// Apply To
with(obj_game) {
    // Set Alarm Countdown
    alarm_set(1, room_speed);
}

// Play Audio
audio_play_sound(snd_die, 0, 0);

// Apply To
with(obj_game) {
    // Set Lives
    if(!variable_instance_exists(id, "__dnd_lives")) __dnd_lives = 0;
    __dnd_lives += real(-1);
}

// Destroy Instance
instance_destroy();

// Repeat
repeat(10)
{
    // Create Instance
    instance_create_layer(x + 0, y + 0, "Instances", obj_debris);
}
 

TsukaYuriko

☄️
Forum Staff
Moderator
You're setting obj_game's alarm 1. It doesn't have an Alarm 1 event. obj_ship has an Alarm 1 event.
 

zee86

Member
Sorry, but I'm still new to it. Can you please explain me what I'm doing wrong? The screenshots I see in the tutorial are the same settings of my game :-(

Screenshot 2020-10-14 233523.png Screenshot 2020-10-14 233708.png
 

Nidoking

Member
Where the text you screenshotted says "we need to add another Alarm Event into the object "obj_game"... you appear not to have added the event into the object obj_game, but the object obj_ship. The next paragraph contradicts that. Weird.
 

chamaeleon

Member
If there's a mistake in a tutorial, don't hesitate to file a bug report so corrects can be made, making life easier for the next person to come along.
 
Top