StateType gives the player's state-type. Refer to the section on StateDef in the CNS documentation for more details on StateType. Useful for "move interrupts" in the CMD file. P2StateType is the same as StateType, except that this returns the opponent's state type.
1.) StateType [oper] state_type
2.) P2StateType [oper] state_type
=, != (other operators not valid)
S, C, A, L
Stand, Crouch, Air, Lie Down state-types.
boolean int (1 or 0)
P2StateType: Returns bottom if p2 does not exist. (For instance, if the round has been won.)
trigger1 = StateType != A
Triggers if the player is not in an air-type state.
MoveType(*,***) & P2MoveType (Triggers)
Often times, when a new coder is defining their Changestate controllers in the character's CMD file, they often make the mistake of using StateType=S or StateType=C as conditions for these attacks. Consider the following Changestate;
[State -1, Hadouken]
type = changestate
trigger1 = ctrl
trigger1 = command = "QCF_X"
trigger1 = StateType = S
value = 1000
The problem with the above is that the QCF_X command requires you to begin the input with D, which if held long enough will put the character into a crouching state. Because of this, if the player inputs the command too fast, the character will still be in a Crouching state, and thus will not go into state 1000. In these cases it is often better to simply use StateType!=A as a trigger instead.