moveHitPersist (CNS) (Read 1821 times)

Started by Ricepigeon, September 22, 2015, 10:32:06 PM
Share this topic:
moveHitPersist (CNS)
New #1  September 22, 2015, 10:32:06 PM
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
Part of the Statedef
If set to 1, the move hit information from the previous state (whether the attack hit or missed, guarded, etc; see "Move*" triggers in trigger docs) will be carried over into this state. If set to 0 (the default), this information will be reset upon entry into this state.

Additional Notes

MoveHitPersist must be set in the StateDef the state that you wish to use it in. This trigger can be handy for Aerial moves that have their own landing states, and you wish to make it possible to cancel the recovery frames of the landing state into another move by using movecontact as a trigger. For example;

[Statedef 2001]
type = S
movetype = I
physics = S
anim = XXX
MoveHitPersist = 1

Assuming that Player1 enters State 2001 immediately from an aerial attack which made contact with Player2, any time the MoveContact trigger is called while Player1 is in State 2001, MoveContact will return 1 (true). Without defining MoveHitPersist, this information would be reset and MoveContact would return 0 (false) regardless of whether Player1's previous state made contact with Player2 or not.
Last Edit: October 13, 2015, 08:01:58 PM by Odb718