I’m experimenting with variables, and there is something I am missing or don’t quite understand yet it seems.
I have 2 variables that will control the players punching combo animations:
IS_PUNCHING checks whether the player is in the punch state triggered by pressing the “X” button
PUNCH_COMBO decides which type of punch animation is played.
The idea is that each time the player presses the “X” button on the gamepad, IS_PUNCH is set to 1 and PUNCH_COMBO gets + 1, and if PUNCH_COMBO goes above 2 it resets back to 1, so the game alternates between punch animation 1 and 2.
Any thoughts on my mistakes?: