KungFuChowder
Member
Okay so now here's a question that's going to take showing multiple events. I'm trying to make a burst fire for one of my ships. So far it's working but only works the first time the button is pressed. It's not resetting somehow after the first burst.
Here's the Create event:
Step event:
Alarm 0:
Alarm 4:
And some of this code probably is redundant but are just my attempts at making it work.
Here's the Create event:
Code:
bulletCounter = 4;
canFire = 1;
Code:
if keyboard_check_pressed(ord("F")){
if (canFire = 1){
if (bulletCounter >= 1){
create_bullet2(image_angle, bulletSpd, faction);
bulletCounter--;
alarm[4] = room_speed/8;
}
}
}
if (bulletCounter < 1){
canFire = 0;
}
if (bulletCounter <= 0){
alarm[0] = room_speed/.5;
}
Code:
canFire = 1;
Code:
bulletCounter -= 1;
create_bullet2(image_angle, bulletSpd, faction);
if (bulletCounter > 0){
alarm[4] = room_speed/8;
}
if (bulletCounter <= 0){
alarm[0] = room_speed/.5;
}