Just thought I could drop this. This is originally based off some other methods I saw in other chars, then modified with few random fixes/changes...
[SP], [CP] and [AP] are the statedef number for the stand, crouch and air parry, [v] is a variable number you choose by yourself...
In the CMD file :
;---------------------------------------------------------------------------
; [PARRY]
; Stand parry
[State -1, stp]
type = hitoverride
triggerall = statetype != A && command = "F"
triggerall = movetype != A
trigger1 = ctrl || stateno = 850 || stateno = 851 || anim = 501 || stateno=[150,153]
trigger1 = var([v]) := (1 + 3*(stateno = [150,153]))
; the +3 is to point out the red parry. Just eye-candy here, to glow red instead of blue.
attr = SA, AA, AP
stateno = 850
time = ifelse((stateno=[150,153]), 6, 8) ; ... for red parry, slightly shorter. Just because.
slot = 1
; Stand parry a crouching, but high, attack
[State -1, stp]
type = hitoverride
triggerall = statetype != A && command = "F"
triggerall = movetype != A
trigger1 = ctrl || stateno = 850 || stateno = 851 || anim = 501 || stateno=[150,153]
trigger1 = var([v]) := (1 + 3*(stateno = [150,153]))
attr = C, AA, AP
stateno = 5005
time = ifelse((stateno=[150,153]), 6, 8)
slot = 2
; Crouch parry
[State -1, crp]
type = hitoverride
triggerall = (statetype = S && command = "D") || (statetype = C && command = "F") ; ... yeah, I allow pressing forward
;_while_ crouching already. Because. Comment ?
triggerall = movetype != A
trigger1 = ctrl || stateno = 850 || stateno = 851 || anim = 501 || stateno = [150,153]
trigger1 = var([v]) := (2 + 3*(stateno = [150,153]))
attr = CS, AA, AP
stateno = 851
time = ifelse((stateno = [150,153]), 6, 8)
slot = 1
; Crouch parry a standing light attack
[State -1, crp]
type = hitoverride
triggerall = (statetype = S && command = "D") || (statetype = C && command = "Fw")
triggerall = movetype != A
trigger1 = ctrl || stateno = 850 || stateno = 851 || anim = 501 || stateno = [150,153]
trigger1 = var([v]) := (2 + 3*(stateno = [150,153]))
attr = S, AA, AP
stateno = 5005
time = ifelse((stateno = [150,153]), 6, 8)
slot = 2
; Air parry
[State -1, aip]
type = hitoverride
triggerall = statetype = A && command = "F"
triggerall = movetype != A
trigger1 = ctrl || stateno = 852 || stateno = [154,155]
trigger1 = var([v]) := (3 + 3*(stateno = [154,155]))
trigger2 = Vel Y > 0 && StateNo = [1050,1201]
trigger2 = var([v]) := (3 + 3*(stateno = [154,155]))
attr = SA, AA, AP
stateno = 852
time = ifelse((stateno = [154,155]), 6, 8)
; no parry if can't parry
[State -1, ps]
type = hitoverride
; player has changed state (attack, no control...)
trigger1 = !ctrl && stateno != [850,852]
trigger1 = anim != 501 && stateno != [150,155]
; player has changed state - a stand parry got activated and the char jumps, have to deactivate stand parry...
trigger2 = statetype = A && var([v]) != 3 && var([v]) != 6
trigger3 = statetype = C && var([v]) != 2 && var([v]) != 5
trigger4 = statetype = S && (var([v]) = 3 || var([v]) = 6)
trigger5 = stateno = [100,110]
attr = SCA
time = 0
slot = 1
[State -1, ps]
type = hitoverride
trigger1 = !ctrl && stateno != [850,852]
trigger1 = anim != 501 && stateno != [150,155]
trigger2 = statetype = A && var([v]) != 3 && var([v]) != 6
trigger3 = statetype = C && var([v]) != 2 && var([v]) != 5
trigger4 = statetype = S && (var([v]) = 3 || var([v]) = 6)
trigger5 = stateno = [100,110]
attr = SCA
time = 0
slot = 2
CNS :
;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5005]
type = S
movetype= H
physics = N
velset = 0,0
[State 5005, stand parry check] ; checks if I'm trying to stand parry an attack that has...
type = VarSet
trigger1 = Var([v]) = 1 || Var([v]) = 4
trigger1 = GetHitVar(AnimType) >= 4 ; ... that has animtype = up or diagup.
; since gethitvar(type) doesn't work, I couldn't check for crouch attacks that hit *high*... (such as Kyō's crouch HP) Bah.
var([v]) = 10
[State 5005, crouch parry check] ; you can crouch parry a light standing attack.
type = VarSet
trigger1 = Var([v]) = 2 || Var([v]) = 5
trigger1 = !GetHitVar(AnimType)
var([v]) = 11
[State 5005, Clipboard]
type = DisplayToClipboard
trigger1 = time
text = "GHVAnimType: %d"
params = GetHitVar(AnimType)
ignorehitpause = 1
[state 5005, parry] ; because it's a movetype = H, you know.
type = LifeAdd
trigger1 = Var([v]) >= 10
value = GetHitVar(Damage)
[State 5005, parry] ; the changestate to the parry state.
type = ChangeState
trigger1 = var([v]) >= 10
value = 840 + Var([v]) ; <= that's because of the state numbers I chose for my parries. Adjust at will.
[after this, the rest is a straight copy of statedef 5000. So that it will behave normally
when it turns out after the double-check that you can't parry.]
Anim 501 is the end of power charge.
Comments, bug reports, be my guest...
One problem with this is, player hits forward when he doesn't have ctrl, releases, gets control back less than 6 ticks later, and gets hit and can't parry, and I guess he should parry in this case...
... Bah...
Most likely not the best method, just one amongst others. Because I felt like.
edit March 7 2006, because.