When the player is in a gethit state, returns the value of the specified hit parameter.
Format: GetHitVar(param_name)
Arguments:
- param_name (string): The name of the hit parameter to check. See Details.
Return type: Depends on specified hit parameter. See Details.
Error conditions: none
Details:
- xveladd (float): Returns the additional x-velocity that is added to the player's own when he is KOed.
- yveladd (float): Returns the additional y-velocity that is added to the player's own when he is KOed.
- type (int): Returns the type of the hit: 0 for none, 1 for high, 2 for low, 3 for trip (ground only).
- animtype (int): Returns the animation type of the hit (0 for light, 1 for medium, 2 for hard, 3 for back, 4 for up, 5 for diag-up).
- airtype (int): Returns the type specified in the HitDef for an air hit.
- groundtype (int): Returns the type specified in the HitDef for a ground hit.
- damage (int): Returns the damage given by the hit.
- hitcount (int): Returns the number of hits taken by the player in current combo.
- fallcount (int): Returns the number of times player has hit the ground in the current combo.
- hitshaketime (int): Returns time player is "frozen" during the hit. This number counts down by 1 for each game tick, and stops when it reaches zero.
- hittime (int): Returns time before player regains control and returns to an idle state after being hit. This counts down by 1 per game tick, as long as hitshaketime (see above) is greater than 0. It stops counting down when the value reaches -1. "GetHitVar(hittime) < 0" is equivalent to the HitOver trigger.
- slidetime (int): Returns time that player slides backwards (on the ground) after the hit.
- ctrltime (int): Returns time before player regains control after guarding the hit.
- recovertime (int): Returns time before player gets up from liedown state This number counts down to 0 for each game tick, and will count down faster if buttons are hit.
- xoff: "Snap" x offset when hit (deprecated)
- yoff: "Snap" y offset when hit (deprecated)
- zoff: "Snap" z offset when hit (deprecated)
- xvel (float): Fixed x-velocity imparted by hit.
- yvel (float): Fixed y-velocity imparted by hit.
- yaccel (float): y acceleration set by the hit.
- chainid (int): Player-assigned chainID for last hit taken.
- guarded (boolean): True if the last hit was guarded, false otherwise.
- isbound (boolean): True if the player is the subject of an attacker's TargetBind controller. Useful to prevent being stuck in thrown states.
- fall (boolean): True if falling, false otherwise
- fall.damage (int): Damage taken upon fall
- fall.xvel (float): x velocity after bouncing off ground
- fall.yvel (float): y velocity after bouncing off ground
- fall.recover (boolean): True if player can recover, false otherwise.
- fall.recovertime (int): time before player can recover.
- fall.kill (int): value of fall.kill parameter in attacker's hitdef.
- fall.envshake.time (int): Returns values set by the fall.envshake.time parameter in an attacker's hitdef.
- fall.envshake.freq (float): Returns values set by the fall.envshake.freq parameter in an attacker's hitdef.
- fall.envshake.ampl (int): Returns values set by the fall.envshake.ampl parameter in an attacker's hitdef.
- fall.envshake.phase (float): Returns values set by the fall.envshake.phase parameter in an attacker's hitdef.
Example:
trigger1 = GetHitVar(yvel) < -5.5
; Triggers if the hit's specified y velocity is less than -5.5.