How to punch only once per click?

add a boolean “ispunching”, set it true right after punch event. Then you attach a delay to the “play anim montage” node, being sure that you plug the return value of the node to the duration of the delay. After that you can set is punching back to false. Last thing but very important right after the event you make branch and condition is gonna be “ispunching?”. If not you go on if yes just leave it blank or maybe setup combo =D. Hope it helps!

just to be very clear, the branch should be the first thing you do after the Punch Event (events are the red ones) at the beginning of the logic.

Hey all,

I’m still new to unreal (3D artist, not programmer, made one game before with a simple collect X number of things to win mechanic, so familiar with BPs and some UI and things like that but not necessarily the concepts behind a lot of other things) so I’m re-making a game for a retro game jam to learn more.

I’m re-making Black Belt, a side scrolling beat 'em up on the sega master system.
Here’s a video:

I’ve gotten here from working for a couple of hours today using the official tutorial on animation montages and punching:

How can I scale back what I have to disable the “hold button to continually punch” thing that’s going on? I just want to throw one punch out at a time, making the player hit the button every time they want to punch. (If the solution is to throw out what I have and do it differently that’s totally fine!) Eventually I’ll adapt this to include the kick, not sure if that’s important to say.

Thank you in advance if anyone is able to help me out, and apologies if these are dumb questions!

PS I saw someone had asked here before:

I’m just not sure how to implement what they said, I’m looking for a more in-depth explanation.

Thanks for your reply!

I thought I understood you until I tested it and the punching stopped working lol Where did I go wrong?

set is punching to true AFTER the false execution of the branch. If this solved your issue please remember to tag the answer as resolved =)

Ahh, when I switch the branch to be immediately after punch, followed by the set ispunching? to true, he stops punching completely ^^;

What’s the reasoning behind linking the branch false to the anim montage? It seems like it should be the opposite, when event punching is true set punching to true (but when I try it that way, it’s back to the original problem of endless punching, haha)

edit; I’ve gotten it to successfully punch once by adding a delay and a set ispunching? false to the and of inputaction punch event sequence in the character blueprint (not the anim blueprint)

201912-capture.png

It works, but I feel like there’s a better way? So if there’s a better way and someone can say what I did wrong thank you, but if not I’ll close this tomorrow ^^ Thanks all!

edit; okay, I went with this but just cut out the released bit because it was causing some AI issues, but it’s working for what I need it for.