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

The alarm

tommarek

Member
Hello I have problem whit the alarm. The alarm dont work. Somebody know where is problem?

cooldown_timer = 3*60;



if (dead) {
sprite_index = Nothing;
speed = 0;
} else {
if (cooldown_timer == 0) {
audio_play_sound(Shoot, 1, false);
audio_play_sound(Shoot, 1, false);
with (instance_create_layer(x, y, "Bullets", oEBullet)) {
direction = point_direction(x, y, oPlayer.x, oPlayer.y);
speed = 10;
cooldown_timer = 3*60;


}
} else {
cooldown_timer = cooldown_timer - 2;
}

}
 

gkri

Member
a) instead of Nothing use noone
b) you cannot use 2 else in the same if statement, replace the first else with else if
 
Top