How To Make Delay After Grappling

How Do I Add A Delay To The Grappling Hook {please do note that i didnt make the blueprint and i am not a programmer } I Basically Want To Make Sure The Character Doesnt Over Use The Grappling Hook And Add A Simple Delay And Also If Anyone Knows How To Make A Little Bar That Shows When The Grappling Hook Is Ready To Use Or A Text To Appear On Screen , Thank You.

Without seeing the blueprint, the best I can do is give a general overview here.

You’ll need a boolean variable named something like “GrapplingHookAvailable” (default value TRUE) and a float variable named “GrapplingHookDelay” (default value whatever you think the delay should be). Sometime shortly after the grappling hook is fired, you want to use a branch to check if “GrapplingHookAvailable” is true. If false, do nothing. If true, then set it to false and then fire the code for the rest of the grappling hook functionality.

At the very end of the blueprint for the grappling hook, add a Delay node. The value of this should be plugged into a Get:GrapplingHookDelay node. After the Delay, set GrapplingHookAvailable boolean back to true and it can be used again.

The simplest way to display this information to the user is with a UMG widget that pops up a picture or text when the delay is over.

To set up a progress bar is slightly more involved: you’ll need to back up a few steps, get rid of the delay, and run this functionality off of something like a Timeline or Tick Event that keeps time and gives you a delta value (amount changed over time). Then you would bind the progress bar in your UMG widget to a 0>>1 float value - driven by the delta - that is a percentage of reset time elapsed. It requires some fairly basic math and blueprinting.

So Yea Where Exactly Do I Place The Delay ??? Or If You Do Know How To Do It When Can I Enable My Character To Use The Grappling Hook In Certain Places ?

At the end of the Keyboard F Input Event (pic 2), you should set a variable HookAvailable to false. Then set a delay of n seconds (I would make it a variable, personally, but you could set it to be always a certain number).

At the beginning of the F Input Event, you should do a branch to see if HookAvailable is true. If it is true, then continue that line as you already have it. If it’s not true, you don’t need to do anything (unless you want like a visual/audio feedback to tell the player that grappling is in delay).

i am sorry but i am not getting it , Where do i add the thing exactly please be specific since i am a noob and Zero Experience at coding

You have not given a picture of where the delay needs to be placed specifically. It is to the right of picture 2 somewhere. I will attempt to work around this and get back to you shortly with a picture of how this should look.

Uhh I Added Everything As You Showed Me In The Pic It Doesnt Shoot The Grappling Hook At All Now