Combo: Atc1,2,3
If no button is pressed for 0.5 seconds the combo resets.
What i am trying to figure out
How to stop player movement (walking) when I initiate the combo
How to reset the combo as soon as i trigger walk
Rn player can perform combo animations while walking and jumping. Similarly if I trigger walk in the middle of he combo the palyer remains stuck in the punch animation for 0.5 seconds before transitioning into the walk animation.
Here is my Event view
Here is a simple pseudo algorithm that should solve your problem :
You will need few variables, such as boolean variable isMove and integer variable comboCount.
// Walking Event (integrating isMove directly)
If [Left or Right key is pressed ] and [isMove = true]
→ Allow player to walk
→ Set animation to “Walk”
// Combo Initiation Event (setting isMove to false)
If [Combo key is pressed] and [comboCount < 3]
→ Increment comboCount by 1
→ Set isMove to false
→ Play combo animation based on comboCount
// Combo Reset on Movement (resetting isMove and comboCount)
If [Left or Right key is pressed] and [isMove = false]
→ Set comboCount to 0
→ Set isMove to true
→ Transition to “Walk” animation