This trigger is valid only when the player is in an attack state. MoveHit gives a non-zero value if P2 has been hit by P1's attack. It gives 0 otherwise. Typically used with the "StateNo" and "Command" triggers for detecting move-interrupts in the CMD file.

Format: MoveHit

Arguments:

- none

Return type: int

Error conditions: none

Details:

On attack contact, MoveHit returns 1. After contact, MoveHit's return value will increase by 1 for each game tick that P1 is not paused (P1 gets paused on contact; see pausetime parameter in HitDef controller).

Note 1: the values of MoveContact, MoveGuarded, MoveHit and MoveReversed are set simultaneously. For example, if one HitDef in a move hits successfully, MoveHit will return non-zero. If a following HitDef in the same move is guarded, MoveGuarded will return non-zero, and the other three triggers will return 0.

Note 2: the values of the four Move* triggers reset to 0 and stop incrementing after a state transition. See "movehitpersist" parameter for StateDefs (CNS docs) for how to override this behavior.

Example:

`trigger1 = MoveHit
; True if P1's attack connected successfully with P2.`