How do I make a cooldown before the gun can be fired?

I want a cooldown for when you shoot a bullet in my game, but I don’t know how to make it. It seems a bit silly to just be able to spam the shoot button over and over again.

Here is the game:

1 Like

(I wanted the cooldown to be around 1.5 seconds if anyone wanted to know.)

1 Like

Spam-shooting is a problem with many games. Try making an animation that goes for however long you want the cooldown to be.

Once the animation is ‘Done’ the bullet emits.

1 Like

Also make the sound effect inputs go to the output in the Emit behavior.

Thanks, It’s in the game now!

1 Like

No problem! I’m glad to have been of service.

Well it’s not really the best solution honestly. But It works I guess. Here’s what I would do:

The switch turns itself off, but also turns on a timer which (after the set delay amount) will turn the switch back on.


Yes, that works too but with an animation he can have a bar or something other over the gun to show the cooldown time.

Both of these solutions work pretty well. FlyingFajita’s is the professional version though.


I think I’ve ended up creating the best of both worlds by making it become yellow when you can’t fire it by timing the animation so it’s as long as the cooldown.
shrinkly shrek

1 Like