How to put a time delay on input events?

I need to limit the amount of button presses a player can do every second. How would I go about doing that?

###More info:
I want to make it so that when a player holds down the mouse button their weapon will continually fire, however I don’t want the player to be able to fire faster by repeatedly pressing the mouse button, ie. using a turbo button that actually shoots faster than just holding down the button.

I’ve tried several different setups and the best I’ve gotten so far is to put a delay after the firing event. But that means once the player presses fire, there is a delay between when the button was pressed and when the weapon actually starts firing. Ideally I’d like the weapon to fire as soon as the button is pressed, but if they release the button and try to fire again before the time interval is up nothing happens.

Howdy!

How did you setup your delay, was it something like this:

You can add this to the First Person Template before the Montage Play node where lowering the FireRate variable increases the number of projectiles that are spawned in succession (you’ll have to play with the value to get the desired effect).

-W

Found an answer here:

https://answers.unrealengine.com/questions/36187/how-do-i-add-a-cooldown-timer-to-skillsinputs.html

1 Like

Even better! Thanks, Wes.