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

SOLVED Need help with Delaying Projectiles when Character Shoots.

I been trying to work on how my character will shoot projectiles and have some sort of delay in-between them. I have this code but what's its doing is that it fires one shoot and it doesn't fire anymore. What I am trying to go for is having the player shoot 3-5 projectiles at a time and have a slight pause.

Create Event

Code:
//Shooting
canShoot = true;
shoot_delay = 1

Step Event

GML:
if keyboard_check_pressed(ord("W")) && canShoot
{
    canShoot = false
    alarm[0] = shoot_delay
    with(instance_create_layer(x,y,"BULLETS", obj_projectile))
    {
    direction = 90
    speed = 10
    }
}
 
Top