Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make efficient punching with combo moves if the key is repeatedly tapped?

Asked by 3 years ago

I'm planning to make a mortal kombat type game, and currently I need help with a basic punching system. I want it to punch with a combo if the "L" key is tapped multiple times. And for the first punch to have an separate anim, the second punch to have a separate anim and the third punch to have a separate anim.

DONT WASTE YOUR TIME WRITTING FULL CODE! Just tell me how/what you recommend me doing.

Thanks :)

1 answer

Log in to vote
0
Answered by 3 years ago

I actually created a lightsaber that does exactly this. Here's how I went about it. SO what I did is I just created a bunch of debounces, then every time someone would swing, I would set the debounce to true or false. For every debounce that's true/false, I would play a different animation. It would basically be a loop/pattern of debounces, and it works great. I suggest you use at least three debounces, or one debounce for every animation. Sometimes you can add an extra debounce for over heating or cooldown, though I would only use that if you really need it.

Cheers, Zander.

0
this is what people need instead of just code, someone explaining how to doit <3 themaxogamer 58 — 3y
0
Lol thanks Cynical_Innovation 595 — 3y
Ad

Answer this question