Grenade Throw - Tap vs. Hold (Cooking)

Hey guys, i know I am missing something simple here. I am using G key as a grenade throw. When pressed, I do a check for which grenade type is equipped, do a pull-pin montage and show a fuse/countdown. This allows the player to cook the grenade. When released, I do the check again for which grenade is being thrown, then do a throw montage, hide the fuse countdown, and launch a physics object. Works great.

The problem is if I tap, instead of hold, the G key, I just get the throw (naturally - i’m just “releasing” the button). I’m looking for a way to - when I tap G - force the game to play through the pullpin steps from “Pressed” and just flow immediately into the stuff in “Released”, so the whole pullpin-to-throw is one fluid movement. Any advice on how to do this?

Thanks in advance for your help!

Hello, do you want something like this ? Throw grenades with tapping posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

Ohhh that could work. Will check it out. Thanks!

I ended up doing this, a small modification to what you posted, which seems to work. I get the same sequence whether I hold or tap G.If I hold, it’ll wait til I release before throwing.

Gonna try slotting all my other blueprints inside this logic shell and see how it goes.

Just FYI - I plugged in my blueprints into this wrapper and everything works. So I have StartThrowing leading off a giant Switch On Enum which handles the pullpin stuff for each grenade type. Those all plug into GetReadyToThrow.

Then ThrowGrenade is plugged into another switch on enum to handle all the grenade throws, and GetReadyToThrow is hanging out by itself, and I tweak the value so all the pullpin/throw combos look good when I tap. You just have to make sure the pullpin and throw animations together roughly add up timewise to your “ReadyToThrowDelay” value.

Thanks for your help with this!

NP, don’t forget to set my answer as accepted if it’s the case.

Done, thanks again!