Disable then re-enable on a cooldown

Lets say you have a dash, you press F and you can spam the dash, i want to make it so you cant dash endlessly by adding a 1 second ‘cooldown’ of some kind. how might i go about accomplishing this?

Make a Boolean variable called “CanDash?”.

When the player presses F, add a branch to check if “CanDash?” is True or False.

When True, trigger the dash logic and set “CanDash?” to False. At the end, put a Delay node of 1s, and then at the end set “CanDash?” back to True.

The easiest way is with a DoOnce and a delay.

There are lots of ways to do this and it really depends on how you want it to behave. You could base it off an animation too, with a AnimNotify that changes a boolean value at the end of the animation, or on release from the input.

But this way will work and is simple for demonstration purposes.

thanks, this works perfectly