I am trying to create a combo system where if i press the square button once it plays the animation “punch 1”. If i press it twice it plays “punch 1” "punch2 " and so on.
I am using a variable “currentcombostep” to count the number of times ive pressed the square button
I believe you can fix it by just changing the order of events. Because, i had the same error and the problem was since changing the variable first before the anim makes it try and do the 2nd combo, so just put the anim first, before the variable changer, and add the condition for the other combos from 1 {If current animation = [insert idle anim or past punch anims or smth]}.
I hope this helps!
Thank you for the solution. Ill try it as soon as i reach home
Yes ill try it once i reach home and update you accordingly
Can you explain this to me in detail?
Can you explain me how to use these comditions as nested lopp?
I tried it but now it wont ay any animation
Just to clear things a bit more, i am using touch screen button. Where i am using x to jump and square to punch.
Should i attach the project file ?
First, you are setting the currentComboStep to 0 every frame which means you’ll never be able to get it past 1. You might want to use a timer instead, when the button is clicked you can reset the timer and then if the timer goes past 0.5 seconds or something, then reset the combo to 0.
As for why the animation isn’t working, I think it might be because you have a space in “punch 0”? The other event is “punch” + variable which would result in “punch1” rather than “punch 1”
So the second image comes first
Of course, Because the animation names are “Punch 1
”, “Punch 2
” and “Punch 3
”, not “Punch1
”, “Punch2
” and “Punch3
” which is what your last event is generating.
In the last event, you are missing the space between the word “Punch
” and the last double quote. Spot the difference:
Me:
You:
Actually i did manage to get the animations playing. But the problem is that the player gets stuck in the animation until the entire sequence is completed.
Hey everyone,
I’m looking to design a combo system (like the ones you see in fighting or action games) but could use some help figuring out where to start. I want it to feel smooth and responsive, with combos that chain together in a way that feels satisfying.