How to I create a wait time before being allowed to do the same animation

Hey everyone!
I’m currently trying to make an FPS game. I just finishing adding in movement and have a sliding animation. I wanted to know how to add a delay before being able to slide again? So I would like it to be where I use the slide and then I can’t spam it so there would be a 5-second cooldown. Would also love if I could get help on how to connect that to a progress bar so I can notify the player when they can slide again. Would also be amazing if you could tell me how to make it so you just have to press the button to slide and not hold it. I tried looking in the input section in the project settings but couldn’t find anything.
Thxs in advance and have a great day!!

You can try the following …

  1. Make a boolean variable called, for example, “sliding enabled?

2.Set the default of the variable to true

  1. Make a Check before the sliding code: If sliding enabled? is true, only then should the character able to slide -->Allows to control whether it is possible to slide or not

4.At the end of the key where the sliding code is, set sliding enabled? to false -->After you slide, you can’t slide again

  1. At Event Tick make a delay node and set it to 5 -->The 5 seconds countdown

6.Conect the delay node pin with the sliding enabled? and set it to true -->Every 5 seconds it is possible to slide

It means 1. 2. 3. 4. 5. 6. :slight_smile: There is a bug

Hey thank you so much for your answer. Would you happen to know how to do the other two things I mentioned? If not then that’s completely fine. And I’m going to do what you said tomorrow morning to see if it works. I’ll let you know. :slight_smile:

did you get this fixed or still needing some help