And a couple more just for fun...
Error:
Character walks on air, and doesn't fall to ground.
The Fix:
Add to this code to your character's statedef -2
;Are you floating?
[State -2, 0000]
type = ChangeState
triggerall = pos y < 0 ; when above ground level
triggerall = vel y = 0 ; and velocity is 0
trigger1 = time >= 1
value = 50 ; go back to jump state
Error:
Character can juggle hits underground.
The Fix:
Add this code to your character's statedef -3
;Prevent Undergound Juggles
[State -3, 0000]
type= targetbind
trigger1= movehit=1
trigger1= numtarget=1 && numenemy
trigger1= (target,time<=1) && (target,ID=enemynear,ID); this is just to prevent Simul issues as usual
trigger1= !(target,hitshakeover) && (target, hitfall) && (target, pos y>0)
pos= ceil(p2dist x), ceil(-pos y); keeps P2 at the same horizontal distance, but resets his Y position
ignorehitpause= 1