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