Defines a single hit of the player's attack. If the player's Clsn1 box (red) comes in contact with his opponent's Clsn2 box (blue), and the HitDef was define on or before that particular point in time, then the specified effect will be applied. This is one of the more complex, but most commonly-used controllers.
A single HitDef is valid only for a single hit. To make a move hit severaltimes, you must trigger more than one HitDef during the attack.
Required parameters:
- attr = hit_attribute (string)
This is the attribute of the attack. It is used to determine if the attack can hit P2. It has the format:
attr = arg1, arg2
Where:
- arg1 is either "S", "C" or "A". Similar to "statetype" for the StateDef, this says whether the attack is a standing, crouching, or aerial attack.
- arg2 is a 2-character string. The first character is either "N" for "normal", "S" for "special", or "H" for "hyper" (or "super", as it is commonly known). The second character must be either "A" for "attack" (a normal hit attack), "T" for "throw", or "P" for projectile.
- hitflag = hit_flags (string)
This determines what type of state P2 must be in for P1 to hit. hit_flags is a string containing a combination of the following characters:
"H" for "high", "L" for "low" or "A" for air. "M" (mid) is equivalent to saying "HL". "F" is for fall, and if included will allow P1 to juggle falling opponents in the air. "D" is for "lying Down", and if included allows P1 to hit opponents lying down on the ground.
Two optional characters are "+" and "-". If "+" is added, then the hit only affects people in a gethit state. This may be useful for chain-moves that should not affect opponents who were not hit by the first move in the chain attack.
If "-" is added, then the hit only affects players that are NOT in a gethit state. You should use "-" for throws and other moves you do not want P1 to be able to combo into.
"+" and "-" are mutually exclusive, ie. cannot be used at the same time.
If omitted, this defaults to "MAF".
- guardflag = hit_flags (string)
This determines how P2 may guard the attack. hit_flags is a string containing a combination of the following characters:
"H" for "high", "L" for "low" or "A" for air. "M" (mid) is equivalent to saying "HL".
Optional parameters:
- animtype = anim_type (string)
This refers to the type of animation that P2 will go into when hit by the attack. Choose from "light", "medium", "hard" or "back". The first three should be self-explanatory. "Back" is the animation where P2 is knocked off her feet.
The default is "Light".
- air.animtype = anim_type (string)
Similar to the "animtype" parameter, this is the animtype to set P2 to if P2 is in the air, instead of on the ground.
Defaults to the same value as the "animtype" parameter if omitted.
- damage = hit_damage, guard_damage (int)
hit_damage is the damage that P2 takes when hit by P2. The optional guard_damage parameter is the damage taken by P2 if the hit is guarded.
Both default to zero if omitted.
- pausetime = p1_pausetime, p2_shaketime (int)
This is the time that each player will pause on the hit.
p1_pausetime is the time to freeze P1, measured in game-ticks.
p2_pausetime is the time to make P2 shake before recoiling from the hit.
Defaults to 0,0 if omitted.
- guard.pausetime = p1_pausetime, p2_shaketime (int)
Similar to the "pausetime" parameter, these are the times to pause each player if the hit was guarded.
Defaults to the same values as the "pausetime" parameter if omitted.
- sparkno = 0, action_no (int)
This is the action number of the spark to display if the hit is successful. The first argument is obselete and should be set to zero.
Defaults to the value set in the player variables if omitted.
- guard.sparkno = 0, action_no (int)
This is the action number of the spark to display if the hit was guarded.
Defaults to the value set in the player variables if omitted.
- sparkxy = spark_x, spark_y (int)
This is where to make the hit/guard spark.
spark_x is a coordinate relative to the front of P2. A negative value makes the spark deeper inside P2.
spark_y is relative to P1. A negative value makes a spark higher up. You can use a tool like AirView to determine this value by positioning the cursor at the "attack spot" and reading off the value of the y-position.
Defaults to 0,0 if omitted.
- hitsound = snd_grp, snd_item (int)
This is the sound to play on hit (from fight.snd). The included fight.snd lets you choose from 5,0 (light hit sound) through to 5,4 (painful whack). To play a sound from the player's own SND file, precede the first number with an "S". For example, "hitsound = S1,0".
Defaults to the value set in the player variables if omitted.
- guardsound = snd_grp, snd_item (int)
This is the sound to play on guard (from fight.snd). Only 6,0 is available at this time. To play a sound from the player's own SND file, precede the first number with an "S". There is no facility to play a sound from the opponent's SND file.
Defaults to the value set in the player variables if omitted.
- ground.type = attack_type (string)
This is the kind of attack if P2 is on the ground. Choose from "High" for attacks that make P2's head snap backwards, "Low" for attacks that look like that hit in the stomach, "Trip" for low sweep attacks, or "None" to not do anything to P2. "High" and "Low" attacks are the same on P2 if the AnimType is "Back".
Defaults to "High" if omitted.
- air.type = attack_type (string)
This is the kind of attack if P2 is in the air.
Defaults to the same value as "ground.type" if omitted.
- ground.slidetime = slide_time (int)
This is the time in game-ticks that P2 will slide back for after being hit (this time does not include the pausetime for P2).
Applicable only to hits that keep P2 on the ground.
Defaults to 0 if omitted.
- guard.slidetime = slide_time (int)
Same as "ground.slidetime", but this is the value if P2 guards the hit.
Defaults to same value as "guard.hittime".
- ground.hittime = hit_time (int)
Time that P2 stays in the hit state after being hit. Increase this value to keep P2 in the hit state for a longer time, perhaps to make it easier to combo. Applicable only to hits that keep P2 on the ground.
Defaults to 0 if omitted.
- guard.hittime = hit_time (int)
Same as "ground.hittime", but this is the value if P2 guards the hit.
Defaults to same value as "ground.hittime".
- air.hittime = hit_time (int)
Time that p2 stays in the hit state after being hit in or into the air, before going into the "air recover" state. This parameter has no effect if the "fall" parameter is set to 1.
Defaults to 20 if omitted.
- guard.ctrltime = ctrl_time (int)
This is the time before p2 regains control in the ground guard state.
Defaults to the same value as "guard.slidetime" if omitted.
- guard.dist = x_dist (int)
This is the x-distance from P1 in which P2 will go into a guard state if P2 is holding the direction away from P1.
Defaults to the value in the player variables if omitted. You normally do not need to use this parameter.
- ground.velocity = x_velocity, y_velocity (float)
Initial velocity to give P2 after being hit, if P2 is on the ground. If y_velocity is not zero, P2 will be knocked into the air.
Both values default to 0 if omitted. You can leave out the y_velocity if you want P2 to remain on the ground.
- guard.velocity = x_velocity (float)
Velocity to give P2 if P2 guards the hit on the ground.
Defaults to the x_velocity value of the "ground.velocity" parameter if omitted.
- air.velocity = x_velocity, y_velocity (float)
Initial velocity to give P2 if P2 is hit in the air.
Defaults to 0,0 if omitted.
- airguard.velocity = x_velocity, y_velocity (float)
Velocity to give P2 if P2 guards the hit in the air.
Defaults to x_velocity*1.5, y_velocity/2, where x_velocity and y_velocity are values of the "air.velocity" parameter.
- airguard.ctrltime = ctrl_time (int)
This is the time before p2 regains control in the air guard state.
Defaults to the same value as "guard.ctrltime" if omitted.
- air.juggle = juggle_points (int)
The amount of additional juggle points the hit requires. Do not confuse this with the "juggle" parameter in the StateDef. You typically do not need this parameter, except for HitDefs of projectiles.
Defaults to 0 if omitted.
- mindist = x_pos, y_pos (int)
Controls the minimum distance of P2 relative to P1, after P2 has been hit. This parameter is not commonly used.
Defaults to no change in P2's position if omitted.
- maxdist = x_pos, y_pos (int)
Controls the maximum distance of P2 relative to P1, after P2 has been hit. This parameter is not commonly used.
Defaults to no change in P2's position if omitted.
- snap = x_pos, y_pos (int)
This moves P2 to the specified position relative to P1 if hit. This controller is not normally used. If you want to snap P2 to a particular position for a throw, it is recommended you use a "TargetBind" controller in P1's throwing state instead.
Defaults to no change in P2's position if omitted.
- sprpriority = drawing_priority (int)
This is the drawing priority of P1's sprite if the move hits or is guarded by P2. This controls whether or not P1 is drawn in front of or behind P2. P2's drawing priority is always set to 0. Set to -1 if you want to make P1 appear behind P2.
The default value is 1.
- p1facing = facing (int)
Set to -1 to make P1 turn around if the hit is successful. Usually useful only for throws.
The default value is no change in where P1 is facing.
- p2facing = facing (int)
Set to 1 to make P2 face the same direction as P1 if the hit is successful, -1 to make P2 face away.
The default value is no change in where P2 is facing.
- p1stateno = state_no (int)
This is the number of the state to set P1 to if the hit is successful. Used mainly for throws.
- p2stateno = state_no (int)
This is the number of the state to set P2 to if the hit is successful. P2 will get P1's states and animation data. Used mainly for throws.
- p2getp1state = value (boolean)
Set to 0 to prevent P2 from getting P1's state and animation data, in case you do not want that default behaviour of the "p2stateno" parameter.
Defaults to 1 if the "p2stateno" parameter is used. Ignored otherwise.
- forcestand = value (boolean)
Set to 1 to force P2 to a standing state-type if the hit is successful, and P2 is in a crouching state.
Normally defaults to 0, but if the y_velocity of the "ground.velocity" parameter is non-zero, it defaults to 1.
- fall = value (boolean)
Set to 1 if you want P2 to go into a "fall" state (where P2 hits the ground without recovering control in the air). Use if you want a move to "knock down" P2.
- fall.xvelocity = x_velocity (float)
This is the x-velocity that P2 gets when bouncing off the ground in the "fall" state.
Defaults to no change if omitted.
- fall.yvelocity = y_velocity (float)
This is the y-velocity that P2 gets when bouncing off the ground in the "fall" state.
Defaults to -4.5 if omitted.
- fall.recover = value (boolean)
Set to 0 if you do not want P2 to be able to recover from the "fall" state.
Defaults to 1 if omitted (can recover).
- fall.recover = recover_time (int)
This is the time that must pass before P2 is able to recover from the "fall" state. Does not include the time that P2 is paused for while shaking from the hit.
Defaults to 4 if omitted.
- down.velocity = x_velocity, y_velocity (float)
This is the velocity to assign P2 if P2 is hit while lying down. If the y_velocity is non-zero, P2 will be hit into the air. If it is zero, then P2 will slide back on the ground.
Defaults to the same values as the "air.velocity" parameter if omitted.
- down.hittime = hit_time (int)
This is the time that P2 will slide back for if P2 is hit while lying down. This parameter is ignored if the y_velocity is non-zero for the "down.velocity" parameter.
- down.bounce = value (boolean)
Set to 1 if you want P2 to bounce off the ground one time (using the fall.xvelocity and fall.yvelocity values) after hitting the ground from the hit.
This parameter is ignored if the y_velocity is zero for the "down.velocity" parameter.
Defaults to 0 if omitted (P2 hits the ground and stays there).
- id = id_number (int)
Main use of this is for chain moves. You can use this number to later detect if a player was last hit by this particular HitDef.
Valid values are all values >= 1.
If omitted, defaults to 0 (no ID).
- chainID = id_number (int)
Main use of this is for chain moves. If P2 was last hit by a move with this ID, only then can he be hit by the HitDef with this chainID. Use in the following parts of a chain move. Note that chain moves are still possible even without the use of "id" and "chainid".
Valid values are all values >= 1.
If omitted, defaults to -1 (chain from any hit).
- palfx.time = duration (int)
If included, this allows for palette effects on P2 if the hit is successful. Time specifies the number of ticks that the palette effects should last. Specify -1 to have the palette effects last indefinitely. Specify 0 to stop any ongoing palette effects.
- palfx.add = add_r, add_g, add_b (int)
- palfx.mul = mul_r, mul_g, mul_b (int)
Each add component is added to the appropriate component of the player's palette, and the result is multiplied by the appropriate mul component divided by 256. For instance, if pal_r is the red component of the character's original palette, then the new red component is (pal_r + add_r)*mul_r/256. The values for mul must be >= 0.
The defaults for these parameters are for no change:
add = 0,0,0
mul = 256,256,256
- palfx.sinadd = ampl_r, ampl_g, ampl_b, period (int)
Creates an additional sine-wave palette addition effect. Period specifies the period of the sine wave in game ticks, and the amplitude parameters control the amplitude of the sine wave for the respective components. For instance, if t represents the number of ticks elapsed since the activation of the PalFX controller, and pal_r is the red component of the character's original palette, then the red component of the character's palette at time t is (pal_r + add_r + ampl_r*sin(2*pi*t/period))*mul_r/256.
- palfx.invertall = bvalue (bool)
If bvalue is non-zero, then the colors in the palette will be inverted, creating a "film negative" effect. Color inversion is applied before effects of add and mul. bvalue defaults to 0.
- palfx.color = value (int)
This affects the color level of the palette. If value is 0, the palette will be greyscale. If value is 256, there is no change in palette. Values in between will have an intermediate effect. This parameter's effects are applied before invertall, add and mul. Values must be in range 0 to 256.
Default value is 256.
Example:
none