StateType gives the player's state-type. Refer to the section on StateDef in the CNS documentation (http://mugenguild.com/forum/topics/details-statedef-cns-169454.0.html) 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.
Format:
1.) StateType [oper] state_type
2.) P2StateType [oper] state_type
Arguments:
[oper]
=, != (other operators not valid)
state_type (char)
S, C, A, L
Stand, Crouch, Air, Lie Down state-types.
Return type:
boolean int (1 or 0)
Error conditions:
StateType: none
P2StateType: Returns bottom if p2 does not exist. (For instance, if the round has been won.)
Examples:
trigger1 = StateType != A
Triggers if the player is not in an air-type state.
Related Triggers:
MoveType(*,***) & P2MoveType (Triggers) (http://mugenguild.com/forum/topics/movetype-triggers-169092.0.html)
Related SCTRL:
StateTypeSet (SCTRL) (http://mugenguild.com/forum/topics/statetypeset-sctrl-170182.0.html)
Additional Notes:
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.