YesNoOk
avatar

StateType & P2StateType (Trigger) (Read 4491 times)

Started by Ricepigeon, October 13, 2015, 07:33:29 pm
Share this topic:
StateType & P2StateType (Trigger)
New #1  October 13, 2015, 07:33:29 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
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.

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:
Code:
trigger1 = StateType != A
  Triggers if the player is not in an air-type state.

Related Triggers:
MoveType(*,***) & P2MoveType (Triggers)

Related SCTRL:
StateTypeSet (SCTRL)


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;

Code:
[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.
Last Edit: October 31, 2016, 05:27:02 am by Just No Point
Re: StateType & P2StateType (Trigger)
New #2  November 21, 2015, 02:23:51 pm
  • ***
  • Mega Man Classic
  • pachirisu is sexy af
    • Canada
    • anoobtroll@gmail.com
In case if people do not know, this is used as one of the most mandatory and non buggy command  in order to trigger a state(AKA attack). So far as I know, there can be 2 ways to trigger a usual command.


(I dozed off and talked about changestates for some reason in the original edit)
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc
Last Edit: November 21, 2015, 02:26:57 pm by Mega Man Classic