;---------------------------------------------------------------------------
; Stand guard hit (knocked back)
[Statedef 151]
type = S
movetype= H
physics = S
anim = 150
[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0
[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C
[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S
[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1
[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1
;---------------------------------------------------------------------------
; Stand guard hit (knocked back)
[Statedef 151]
type = S
movetype= H
physics = S
anim = 150
[State 151, (X)VelSet]
type = VelSet
trigger1 = Time = 0
x = GetHitVar(Xvel)*facing ;# <<<< 1: This will give proper pushbacks depending on each attack
[State 151, (X)VelSet =0]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0
[State 151, StateTypeSet =C]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C
; Hi to Lo
[State 151, StateTypeSet =S]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S
; Lo to Hi
[State 151, CtrlSet = 1 ]
type = CtrlSet
trigger1 = Time < GetHitVar(ctrltime) ;# <<<< 2: I'm not sure if it's necessary ... but it keeps (ctrl=0) until the end of blockstun
value = 0 ;# <<< 2: see the comment above
[State 151, ChangeState(0-11)]
type = ChangeState
trigger1 = HitOver
value = (0 + 11*(command = "holddown")) ;# <<<< 3: !! ESSENTIAL : don't go back to 130 state ! Rather redirect to standing or crouching
ctrl = 1 ;# <<<< 3: !! ESSENTIAL (2nd part) : and give control back !
;---------------------------------------------------------------------------
;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 6
;---------------------------------------------------------------------------
;Stand Light Punch
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = (statetype = S) || (statetype = C) ; # <<< here is the change ... yep, only this ...
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 6