D
dragon_slayer25
Guest
I've been trying to make a spawner in a game and the code wont spawn anything.
in the step event
and the level is set to 1 and the spawn is true
the alarm 0 is
and spawner 1 is the same with just different object and variable name.
I dont know how to fix this problem and my game does not spawn a single slime.
in the step event
Code:
if(obj_stats.level < 5 and spawn == true) {
alarm[0] = 30
spawn = false
alarm[2] = 32
}
else if(obj_stats.level < 10 and spawn == true){
alarm[0] = room_speed * 7.5
alarm[1] = room_speed * 10
spawn = false
alarm[2] = room_speed * 11
}
else if(obj_stats.level < 20 or obj_stats.level = 20 and spawn == true){
alarm[0] = room_speed * 5
alarm[1] = room_speed * 7.5
spawn = false
alarm[2] = room_speed * 10
}
else if(obj_stats.level > 20 and spawn == true){
alarm[0] = room_speed * 2.5
alarm[1] = room_speed * 5
spawn = false
alarm[2] = room_speed * 10
}
the alarm 0 is
Code:
slime1x = random_range(32,288)
slime1y = random_range(32,605)
instance_create_depth(slime1x,slime1y,0,obj_slime)
I dont know how to fix this problem and my game does not spawn a single slime.