Spawning too much bullets

Sounds like your animation lasts several steps, and during each step of the animation, you have it firing a bullet. So if your room speed is 30 and your animation lasts about a second, you'll fire 30 bullets.

You need to expressly tell your object when it can and can't shoot. There would be many many many ways to do this, depends on how you're going about the animations. But you basically need to have a variable or a check that tells the object when it can fire a bullet.

If your sprite_index changes for the shooting animation and then changes back to a normal sprite after shooting, you could simply check what sprite_index your object is in and only allow firing then.

example step event:

if keyboard_check_pressed(vk_ctrl) && sprite_index = spr_normal {
  // vk_ctrl here is whatever your shoot button is.
  // spr_normal is whatever your default sprite index is.

  /* put your bullet creation code here */
}

If you're doing things some other way, then you might just use a variable to control the shooting...

create event:

canShoot = 1;       // can we shoot?
refireRate = 0.1;   // higher value = faster refire rate (max 1)

step event:

if canShoot < 1 then canShoot += refireRate; // increase canShoot every step

if canShoot >= 1 {
  // bullet creation code and animation code
  canShoot = 0; // reset our canShoot variable to prevent shooting.
}

If you do the above you'll need to manage the refire rate so that it matches the animation manually.

There are better ways to approach all this, but it all depends on your game and that should be enough to help you solve your problem.

/r/gamemaker Thread