YesNoOk
avatar

StateNo & P2StateNo (Triggers) (Read 1325 times)

Started by Ricepigeon, October 13, 2015, 07:27:24 pm
Share this topic:
StateNo & P2StateNo (Triggers)
New #1  October 13, 2015, 07:27:24 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
StateNo Returns the player's current state number. Useful for "move interrupts" in the CMD file. P2StateNo is the same as StateNo, except that this returns the opponent's state number.

Format:
    1.) StateNo
    2.) P2StateNo
Arguments:
    none
Return type:
    int
Error conditions:
    StateNo: none
    P2StateNo: Returns bottom if p2 does not exist. (For instance, if the round has been won.)

Example:
Code:
trigger1 = stateno = [200,650]
  Returns true if the state number is between 200 and 650,
  inclusive.

Additional Notes:
You'll be using this trigger very often when defining combo conditions in your character's CMD file, for example:

Code:
[State -1, S.Med Punch]
type = changestate
triggerall = command = "y"
trigger1 = ctrl
trigger2 = stateno = 200 && movecontact
value = 210

The above code, specifically the trigger2, will allow the player to cancel his Standing Light Punch (state 200) into his Standing Medium Punch when he/she makes contact with the opponent, allowing the two moves to combo.

This trigger can also be used to detect when a player is getting up from being knocked down (state 5120), is in any of his/her guarding states (states 120 to 155), or any other common states.
Last Edit: October 13, 2015, 07:37:41 pm by Ricepigeon