Y
Yvalson
Guest
So i'm trying to get my wave system to work. but when I start my game it will just hang whenever I press the start button
the code for the wave is as followed as I think it's related to the spawning of instances which has caused me same kind of problems before. anyway here is the code maybe someone can see why it keeps hanging.
the code for the wave is as followed as I think it's related to the spawning of instances which has caused me same kind of problems before. anyway here is the code maybe someone can see why it keeps hanging.
Code:
Last_Pause ++
if(Last_RSpider = 3){
CurR_Spiders = ++
Last_RSpider = 0
}
if(Last_BulletRain = 4){
CurBulletRains = ++
Last_BulletRain = 0
}
if(Last_Bomb = 2){
CurBomb = ++
Last_Bomb = 0
}
var i;
for(i = 0; i < CurSpiders / 5; i++){
Spider = instance_create(irandom_range(0, room_width), random_range(0, room_height), Obj_Spider)
}
var l;
for(l = 0; l < CurR_Spiders; l++){
RSpider = instance_create(irandom_range(0, room_width), random_range(0, room_height), Obj_Spider_Ranged)
}
var p;
for(p = 0; p < CurBomb; p++){
Bomb = instance_create(irandom_range(0, room_width), random_range(0, room_height), Obj_Bomb)
}
var q;
for(q = 0; q < CurBulletRains; q++){
BulletRain = instance_create(irandom_range(0, room_width), random_range(0, room_height), Obj_BulletRain)
}
Alarm_Set = 0