Fiddling about with a clone of the arcade game Kung Fu Master. I nailed standing kick and punch with collision box. My problem is when I combine states.
I have Alterable variables to check what state the player is in: Face left, face right, stand punch, stand kick, jump, crouch and crouch kick so far.
Now, I can't figure out how to enable the crouch kick state while in the crouch state, any tips?
Setup for crouch is like this:
Events -
Repeat while joystick is held down
PMO - Object is standing on ground
stand punch = 0
stand kick = 0
crouch kick = 0
Code -
Change speed of animation: 15
Change animation sequence to crouch down
Event 2 -
animation crouch down is playing
code-
set crouch to 1
Event 3 -
animation crouch down has finished playing
code-
set crouch to 0
Setup for crouch kick is like this:
Events -
Pressed fire 2
Repeat while joystick is held down
PMO - Object is standing on ground
stand punch = 0
stand kick = 0
crouch kick = 0
only one action per loop
Code-
Change speed of animation to 15
Change animation sequence to crouch kick
Event 2-
animation crouch kick is playing
only one action when event loops
code-
create hitbox at location x,y
set crouch kick to 1
Event3-
Animation crouch kick has finished
code-
Set crouch kick to 0
destroy hitbox