YesNoOk
avatar

HitDef (SCTRLs) (Read 28290 times)

Started by Odb718, September 30, 2015, 12:13:58 pm
Share this topic:
HitDef (SCTRLs)
New #1  September 30, 2015, 12:13:58 pm
  • *****
  • Shame on you!
    • USA

  • Online
 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 several times, 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 "A" for All, "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.

Optional parameters:
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. "H", "L" or "A" (or "M") must be present in the hitflag string.

P allows type = projectile to hit each other. They're not used much these days because helpers. But a projectile that lacks P in the hitflags can't cancel out other type = projectiles.

        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". If omitted, defaults to an empty string, meaning P2 cannot guard the attack.

affectteam = team_type (string)  team_type specifies which team's players can be hit by this HitDef. Use B for both teams (all players), E for enemy team (opponents), or F for friendly team (your own team). The default is E.

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", "back", "up", or "diagup". The first three are self-explanatory. "Back" is the animation where P2 is knocked off her feet. "Up" should be used when the character is knocked straight up in the air (for instance, by an uppercut), and "DiagUp" should be used when the character is knocked up and backwards in the air, eventually landing on his head. 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.

fall.animtype = anim_type (string) Similar to the "animtype" parameter, this is the animtype to set P2 to if P2 is hit while falling. Defaults to Up if air.animtype is Up, or Back otherwise.

priority = hit_prior (int), hit_type (string) Specifies the priority for this hit. Hits with higher priorities take precedence over hits with lower priorities. Valid values for hit_prior are 1-7. Defaults to 4.
        hit_type, if specified, gives the priority class of the hit. Valid priority classes are Dodge, Hit, and Miss. The priority class determines the tiebreaking behavior when P1 and P2 hit each other simultaneously with equal priorities. The behavior for P1 vs. P2 is as follows:

            Hit vs. Hit: both P1 and P2 are hit
            Hit vs. Miss: P1 hits, P2 misses
            Hit vs. Dodge: Both miss
            Dodge vs. Dodge: Both miss
            Dodge vs. Miss: Both miss
            Miss vs. Miss: Both miss

        In the case of a no-hit tie, the respective HitDefs stay enabled. "Miss" or "Dodge" are typically used for throws, where P1 and P2 should not be able to simultaneously hit each other. The default for hit_type is "Hit".

damage = hit_damage, guard_damage (int, 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, 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, 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 = action_no (int) This is the action number of the spark to display if the hit is successful. To play a spark out of the player's .AIR file, precede the action number with an S, e.g. "sparkno = S10". Defaults to the value set in the player variables if omitted.

guard.sparkno = action_no (int) This is the action number of the spark to display if the hit was guarded. To play a spark out of the player's .AIR file, precede the action number with an S. Defaults to the value set in the player variables if omitted.

sparkxy = spark_x, spark_y (int, 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. "Front" refers to the x- position at P2's axis offset towards P1 by the corresponding width value in the [Size] group in P2's player variables. 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, int) This is the sound to play on hit (from common.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, int) This is the sound to play on guard (from common.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 hit P2 in the stomach. - "Trip": for low sweep attacks. If you use "Trip" type, the ground.velocity parameter should have a non-zero y-velocity, and the fall parameter should be set to 1. A tripped opponent does not bounce upon falling on the ground. - "None": for attacks that do nothing besides pause P1 and P2 for the duration in the pausetime parameter.
        If P2 is hit from behind, "High" will be displayed as "Low" and vice-versa. P2's animation for "High" and "Low" types will be superseded if the AnimType parameter 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. Adjust this value carefully, to make combos possible. 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 being able to guard again. 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.

yaccel = accel (float) Specifies the y acceleration to impart to P2 if the hit connects. Defaults to .35 in 240p, .7 in 480p, 1.4 in 720p.

ground.velocity = x_velocity, y_velocity (float, 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, 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 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.

ground.cornerpush.veloff = x_velocity (float) Determines the additional velocity (velocity offset) to impart to the player if he lands a ground hit in the corner. Setting this to a higher value will cause the player to be "pushed back" farther out of the corner. If omitted, default value depends on the attr parameter. If arg1 of attr is "A", default value is 0. Otherwise, defaults to 1.3 * guard.velocity.

air.cornerpush.veloff = x_velocity (float) Determines the additional velocity (velocity offset) to impart to the player if he lands a hit to an aerial opponent in the corner. Setting this to a higher value will cause the player to be "pushed back" farther out of the corner. Defaults to ground.cornerpush.veloff if omitted.

down.cornerpush.veloff = x_velocity (float) Determines the additional velocity (velocity offset) to impart to the player if he lands a hit on a downed opponent in the corner. Setting this to a higher value will cause the player to be "pushed back" farther out of the corner. Defaults to ground.cornerpush.veloff if omitted.

guard.cornerpush.veloff = x_velocity (float) Determines the additional velocity (velocity offset) to impart to the player if his hit is guarded in the corner. Setting this to a higher value will cause the player to be "pushed back" farther out of the corner. Defaults to ground.cornerpush.veloff if omitted.

airguard.cornerpush.veloff = x_velocity (float) Determines the additional velocity (velocity offset) to impart to the player if his hit is guarded in the corner. Setting this to a higher value will cause the player to be "pushed back" farther out of the corner. Defaults to guard.cornerpush.veloff if omitted.

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. Not to be confused 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, int) See below.
maxdist = x_pos, y_pos (int, int) These let you control the minimum and maximum distance of P2 relative to P1, after P2 has been hit. These parameters are not commonly used. Defaults to no change in P2's position if omitted.

snap = x_pos, y_pos (int, int) This moves P2 to the specified position relative to P1 if hit. This parameter 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.

p1sprpriority = drawing_priority (int) This is the drawing priority of P1's sprite if the move hits or is guarded by P2. Together with the p2sprpriority parameter, it controls whether or not P1 is drawn in front of or behind P2. The default value is 1.

p2sprpriority = drawing_priority (int) This is the drawing priority of P2's sprite if the move hits or is guarded by P2. The default value is 0.

p1facing = facing (int) Set to -1 to make P1 turn around if the hit is successful. The default value is no change in where P1 is facing.

p1getp2facing = facing (int) Set to 1 to have P1 face in the same direction as P2 is facing after the hit connects, and -1 to have P1 face the opposite direction from P2. Defaults to 0 (no change). If nonzero, this parameter takes precedence over p1facing.

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 0, 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. The state must be an attack state (movetype = A) for at least 1 tick. Used mainly for throws. Defaults to -1, no change.

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 state and animation data. P2 will retain P1's states and animation data until P2 is hit, or a SelfState controller is used to return P2 to his own states. The state must be a get-hit state (movetype = H) for at least 1 tick. Used mainly for throws; can also be used for custom hit reactions. Defaults to -1, no change.

p2getp1state = bvalue (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 = bvalue (boolean) Set to 1 to force P2 to a standing state-type if the hit is successful, and P2 is in a crouching state. Has no effect if P2 is in an air state. Normally defaults to 0, but if the y_velocity of the "ground.velocity" parameter is non-zero, it defaults to 1.

fall = bvalue (boolean) Set to 1 if you want P2 to go into a "fall" state (where P2 hits the ground without regaining control in the air). Use if you want a move to "knock down" P2. Defaults to 0.

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 in 240p, -9 in 480p, -18 in 720p.

fall.recover = bvalue (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.recovertime = recover_time (int) This is the time that must pass before P2 is able to recover from the "fall" state by inputting his recovery command. Does not include the time that P2 is paused for while shaking from the hit. Defaults to 4 if omitted.

fall.damage = damage_amt (int) Indicates the amount of damage to deal when P2 hits the ground out of a falling state. Defaults to 0 if omitted.

air.fall = bvalue (boolean) Set to 1 if you want P2 to go into a "fall" state (where P2 hits the ground without regaining control in the air) if hit while P2 is in the air. Defaults to the same value as fall.

forcenofall = bvalue (boolean) Set to 1 to force P2 out of a "fall" state, if he is in one. This parameter has no effect on P2 if he is not in a "fall" state. This parameter is ignored if the "fall" parameter is set to 1. Defaults to 0 if omitted.

down.velocity = x_velocity, y_velocity (float, 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 = bvalue (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) Idetifier for the hit. Used for chain moves. You can use this number to later detect if a player was last hit by this particular HitDef. This number is called the targetID. It is used in controllers such as TargetBind, or in the target(ID) redirection keyword. Valid values are all values >= 1. If omitted, defaults to 0 (no ID). TargetID is not to be confused with PlayerID.

chainID = id_number (int) Main use of this is for chain moves. If P2 was last hit by a move by P1 with this ID, only then can he be hit by the HitDef with this chainID. You can use this in the following parts of a chain move. Note that chain moves are still possible even without the use of the "id" and "chainid" parameters. Valid values are all values >= 1. If omitted, defaults to -1 (chain from any hit).

nochainID = nochain_1, nochain_2 (int) nochainID specifies up to 2 ID numbers of hits which cannot be chained into this hit. If these are -1 (the default), then chaining is not explicitly disabled for any hit ID numbers. nochain_2 can be omitted. Except for -1, the values specified must not coincide with the value for chainID. This parameter has no effect if P2 is hit by a third party between P1's previous HitDef and the current HitDef.

hitonce = hitonce_flag (boolean) If set to 1, the HitDef only affects one opponent. If the hit is successful, all other targets will be dropped. Normally defaults to 0. The exception is if the "attr" parameter is a throw type, which makes it default to 1.

kill = bvalue (boolean) Set to 0 if this hit should not be able to KO the opponent when the hit is successful. Defaults to 1.

guard.kill = bvalue (boolean) Set to 0 if this hit should not be able to KO the opponent when the hit is guarded. Defaults to 1.

fall.kill = bvalue (boolean) Set to 0 to prevent this attack from KO'ing the opponent when he falls on the ground (see fall.damage). Defaults to 1.

numhits = hit_count (int) hit_count indicates how many hits this hitdef should add to the combo counter. Must be 0 or greater. Defaults to 1.

getpower = p1power, p1gpower (int, int) p1power specifies the amount of power to give P1 if this HitDef connects successfully. p1gpower specifies the amount of power to give P1 if this HitDef is guarded. If omitted, p1power defaults to hit_damage (from "damage" parameter) multiplied by the value of Default.Attack.LifeToPowerMul specified in data/mugen.cfg. If p1gpower is omitted, it defaults to the value specified for p1power divided by 2.

givepower = p2power, p2gpower (int, int) p2power specifies the amount of power to give P2 if this HitDef connects successfully. p2gpower specifies the amount of power to give P2 if this HitDef is guarded. If omitted, p1power defaults to hit_damage (from "damage" parameter) multiplied by the value of Default.GetHit.LifeToPowerMul specified in data/mugen.cfg. If p1gpower is omitted, it defaults to the value specified for p1power divided by 2.

palfx.time = palfx_time (int) See below.
palfx.mul = r1, g1, b1 (int, int, int) See below.
palfx.add = r2, g2, b2 (int, int, int) If included, this allows for palette effects on P2 if the hit is successful. palfx_time is the time in game-ticks to apply palette effects on P2. palfx_time is 0 by default (no effect). The rest of the parameters are the same as in the PalFX controller.

envshake.time = envshake_time (int)See below.
envshake.freq = envshake_freq (float) See below.
envshake.ampl = envshake_ampl (int) See below.
envshake.phase = envshake_phase (float) If included, this shakes the screen if the hit is successful. envshake_time is the time in game-ticks to shake the screen. The rest of the parameters are the same as in the EnvShake controller.

fall.envshake.time = envshake_time (int) See below.
fall.envshake.freq = envshake_freq (float) See below.
fall.envshake.ampl = envshake_ampl (int) See below.
fall.envshake.phase = envshake_phase (float) Similar to the envshake.* parameters, except the effects are applied only when P2 hits the ground.

Notes: The behavior of HitDef is undefined when executed from a [Statedef -2] block while the player has another player's state and animation data.

Example:  See below.
vVv Wheat Stage Released vVv
Last Edit: February 14, 2018, 01:23:22 pm by Odb718
Re: HitDef (SCTRLs)
#2  September 30, 2015, 12:14:24 pm
  • *****
  • Shame on you!
    • USA

  • Online
Fighter Factory 3's example HitDef
Code:
[State 0, HitDef]
type = HitDef
trigger1 =
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
;affectteam = E          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
;fall.animtype = Back
;priority = 4,Hit
damage = 0,0
pausetime = 0 ,0
;guard.pausetime = 0,0
sparkno = S3000
guard.sparkno = S3100
sparkxy = 0,0
hitsound = S1,0
guardsound = S2,0
ground.type = High      ;Low,Trip,None
;air.type = High
ground.slidetime = 0
;guard.slidetime = 0
ground.hittime = 0
;guard.hittime = 0
air.hittime = 20
;guard.ctrltime = 0
;guard.dist = 320
;yaccel = 0.5
ground.velocity = 0,0
;guard.velocity = 0
air.velocity = 0,0
;airguard.velocity = 0,0
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;down.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;airguard.ctrltime = 0
;air.juggle = 0
;mindist = 0,0
;maxdist = 0,0
;snap = 0,0
sprpriority = 1
;p1facing =
p1getp2facing = 0
;p2facing =
;p1stateno =
;p2stateno =
;p2getp1state = 1
;forcestand = 0
fall = 0
;fall.xvelocity = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
;air.fall = 0
;down.velocity = 0,0
;down.hittime = 0
down.bounce = 0
id = 0
chainID = -1
nochainID = -1
hitonce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
;getpower = 0,0
;givepower = 0,0
palfx.time = 0
;palfx.mul =
;palfx.add =
envshake.time = 0
;envshake.freq =
;envshake.ampl =
;envshake.phase =
fall.envshake.time = 0
;fall.envshake.freq =
;fall.envshake.ampl =
;fall.envshake.phase =
;ignorehitpause =
;persistent =
vVv Wheat Stage Released vVv
Last Edit: September 30, 2015, 12:17:41 pm by Odb718
Re: HitDef (SCTRLs)
#3  September 30, 2015, 01:01:22 pm
  • ****
  • Prince of Latis
  • Destroy the Core!
    • Canada
    • Skype - Whiplash-1
Things to note are that a hitdef will ONLY be active if the character or helper's movetype = A. If your state's move type is something other then "A" (I,H) the hitdef will not activate regardless of it's trigger.

Also a hitdef will stay active until the character (or helper) changes states, it's movetype ceases to be "A", or the attack makes contact with an enemy.
Last Edit: October 09, 2015, 03:25:28 pm by -Whiplash-
Re: HitDef (SCTRLs)
#4  September 30, 2015, 03:49:28 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
It should be noted that the p2stateno parameter isn't very practical, reason for this being that if Player1 and Player2 end up trading hits, Player1 will be in his/her hitstates, while Player2 will be placed in the custom state number defined by the p2stateno parameter, leading to situations which Player2 may not be able to recover from. Another issue is that if Player2 has a HitOverride active, any HitDefs in where p2stateno is defined will never make contact, this is normally an issue in non-throw cinematic attacks that require the first to make contact with Player2. It's generally recommended to use the TargetState controller from within Player1's files instead in order to avoid these issues.

Another thing to note is that Mugen's priority system for HitDefs seems to be a feature unique only to Mugen, as most other fighting games do not have such systems implemented, and instead rely on hitbox placement to determine attack priority. If trying to make a source accurate character from one of these games, it is generally recommended to leave the attack priority at the default value of 4, or omit the line altogether (unless you specifically need to define the hit_type, such as "Miss" for throw attacks).
Last Edit: September 30, 2015, 03:57:00 pm by Ricepigeon
Re: HitDef (SCTRLs)
#5  October 01, 2015, 10:12:49 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
If for any reason at all you leave ATTR out from the attack mugen will not throw an error message or crash. It simply continues working. Except the hitdef doesn't work. This can be quite hard to diagnose as there is no error condition.

Animtype = Up where fall = 0 is also broken. The character will automatically recover as soon as their animation is complete. No keypress required. Fall = 1 resolves this to some extent, except you must press the recovery command to get out. There is no intrinsic way to have the UP animtype allow recovery after X ticks, it is either when the animation completes, or never. You need to use state -2 and targetstate to get around this, or a custom state.

Alternatively we need to get into the common1.cns and fix up some of mugens stupid stuff and release it as a community thing.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: HitDef (SCTRLs)
#6  October 02, 2015, 06:20:18 pm
  • *****
  • Shame on you!
    • USA

  • Online
For Mindist, Maxdist, & Snap you can drop the Y value and it will work properly.
If you dont want to control the horizontal distance and only affect the Y position of P2, use
floor(p2dist x)
as the X value.
vVv Wheat Stage Released vVv
Re: HitDef (SCTRLs)
#7  March 23, 2016, 10:38:51 pm
  • ****
  • it's me
  • Maybe something different
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
    • cowabungamugenteam.weebly.com
I have a question regarding this controller, would hitdefs that have "None" type break anything? Does it have any uses?
Re: HitDef (SCTRLs)
#8  April 04, 2016, 08:57:20 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Another thing to note is that Mugen's priority system for HitDefs seems to be a feature unique only to Mugen, as most other fighting games do not have such systems implemented, and instead rely on hitbox placement to determine attack priority.

After further research it turns out that, while true in most cases, Street Fighter 3: Third Strike and Street Fighter 5 are the exceptions to this rule. The way those games handle priority is, in addition to hitbox placement:

Priority 1 = Supers
Priority 2 = Specials & Heavies
Priority 3 = Mediums
Priority 4 = Lights

Medium strength attacks take priority over light attacks, heavy strength & special attacks take priority over both light and medium attacks, and Supers take priority against everything else. In Street Fighter 5, attacks that can cause Crush Counter use this priority system to determine if an attack causes a Crush Counter or a normal counterhit.

Sources:
http://www.capcom-unity.com/street_fighter/go/thread/view/7411/28670443/understanding-tradespriority-in-3rd-strike
http://streetfighter.wikia.com/wiki/Crush_Counter
Last Edit: April 04, 2016, 09:03:47 pm by Ricepigeon
Re: HitDef (SCTRLs)
#9  April 04, 2016, 09:00:30 pm
  • ******
  • Loyal to the Game
  • I'M SHADYYYYYYYYYY
    • USA
    • http://jesuszilla.trinitymugen.net/

  • Online
You might want to reverse those numbers since MUGEN's priority system works with the HIGHER number having higher priority.

And to keep SFV and SF3 in line with everything else, use it as follows:

3 - Light
4 - Medium
6 - Specials, Heavy
7 - Supers

Most Capcom characters use 3 for light attacks, 4 for medium, 5 for heavy, 6 for specials, and 7 for supers. Since SFV and SF3 put heavies and specials in the same spot, it's best to skip 5 and move heavies to 6.
Re: HitDef (SCTRLs)
#10  April 04, 2016, 09:14:13 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Apparently, SF5 changes things up; Specials and Anti-air attacks still trade with normals;



Attempting to replicate this part using MUGEN's default priority system may be difficult, if not impossible, outside of a fullgame environment.
Re: HitDef (SCTRLs)
#11  August 14, 2016, 02:01:52 pm
  • ******
  • I will absolve you of your original colors.
If you leave the first argument of the ATTR parameter blank, the hitdef will not be affected by reversaldefs, but the hitdef will work as normal. Useful if you don't want moves to be countered or projectiles to be reflected.

Hitdef
attr = , SA
Re: HitDef (SCTRLs)
#12  August 14, 2016, 02:20:12 pm
  • ******
I always wondered:
animtype = light          ;light,medium,hard,back,up,diagup

you can also write "heavy" instead of "hard", but what's the difference? Is there any?
Re: HitDef (SCTRLs)
#13  August 14, 2016, 08:08:42 pm
  • ******
  • I will absolve you of your original colors.
Mugen also accepts hippopotamus. First letter is all that matters.
Re: HitDef (SCTRLs)
#14  August 18, 2016, 10:00:59 pm
  • ******
    • www.justnopoint.com/
Added documentation on hitflag=P
Re: HitDef (SCTRLs)
#15  October 19, 2016, 09:04:15 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Also, if you are using expressions in the spark or sound parameters, the prefixes need to be included before the expression:
This will work:
Quote
sparkno = SIfElse((var(1)=1),1000,1005)

Whereas this one will crash Mugen:
Quote
sparkno = IfElse((var(1)=1),S1000,S1005)
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: HitDef (SCTRLs)
#16  January 13, 2017, 06:12:39 pm
  • ******
    • www.justnopoint.com/
More notes on differences with P1StateNo and ChangeState


XGargoyle - Today at 10:59 AM
by the way, the damage scaling on FF was not due to the dampening system

JustNoPoint - Today at 11:00 AM
oh?

XGargoyle - Today at 11:00 AM
it was related to the p1stateno in the hitdef
apparently, p1stateno and changestate are triggerd on different timings

JustNoPoint - Today at 11:01 AM
For the clones fix?

XGargoyle - Today at 11:01 AM
yes
I had the same problem with the Atomic Blast

JustNoPoint - Today at 11:01 AM
Is it easy to resolve?

XGargoyle - Today at 11:02 AM
yes, but needs to be checked on individual basis

JustNoPoint - Today at 11:02 AM
That's useful info to add to the MUGEN Class

XGargoyle - Today at 11:02 AM
because sometimes you have to add additional triggering conditions to the targetstate and the changestate
using just movecontact or movehit sometimes is not enough
as they trigger the change state too early or too late

JustNoPoint - Today at 11:03 AM
To clarify you are using MoveHit = 1?

XGargoyle - Today at 11:05 AM
for the final flash, I had to add a special var check, as damage was controlled by a variable
in the case of the Atomic Blast, I had to add an additional removeexplod on the new state, because the changestate was triggered earlier than just the p1state from the hitdef

JustNoPoint - Today at 11:06 AM
That's crazy
Leave it to elecbyte

XGargoyle - Today at 11:06 AM
yeah
mugen does wanky stuff sometimes
I think the p1stateno from the hitdef is actually triggered after the hitpauses
but the changestate can ignore the hitpause
therefore, the movecontact=1 fails triggers earlier

JustNoPoint - Today at 11:09 AM
try with ignorehitpause=0?

XGargoyle - Today at 11:10 AM
if you do that, movehit=1 will not trigger
JustNoPoint - Today at 11:10 AM
ah

XGargoyle - Today at 11:10 AM
crazy stuff
Re: HitDef (SCTRLs)
#17  February 15, 2017, 05:04:34 pm
  • ******
    • www.justnopoint.com/
Quote
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 hit P2 in the stomach. - "Trip": for low sweep attacks. If you use "Trip" type, the ground.velocity parameter should have a non-zero y-velocity, and the fall parameter should be set to 1. A tripped opponent does not bounce upon falling on the ground. - "None": for attacks that do nothing besides pause P1 and P2 for the duration in the pausetime parameter.
        If P2 is hit from behind, "High" will be displayed as "Low" and vice-versa. P2's animation for "High" and "Low" types will be superseded if the AnimType parameter is "Back". Defaults to "High" if omitted.

If you use the Trip parameter you will not be able to hit the opponent while they are on the ground (OTG)
Re: HitDef (SCTRLs)
#18  March 29, 2017, 05:34:49 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Thanks to a recently discovered bug, a hitdef can be assigned more than one hit attribute simultaneously (ie: S,SA,SP for both Standing Special Attack & Standing Special Projectile). Read this thread for more info on this bug and its effects.

And yes, this means that SCA,NA,NP,NT,SA,SP,ST,HA,HP,HT is a completely valid value for a hitdef's attr parameter
Last Edit: March 29, 2017, 05:38:20 pm by Ricepigeon
Re: HitDef (SCTRLs)
#19  August 04, 2017, 06:36:15 pm
  • ******
    • www.justnopoint.com/
Using fall.damage will not scale in accordance to P2's defense settings. You should instead take the life away with targetlifeadd or in a custom state using lifeadd

ink

Re: HitDef (SCTRLs)
#20  November 04, 2017, 09:39:53 pm
  • ****
  • inktrebuchet
    • USA
    • s236.photobucket.com/albums/ff271/inktrebuchet/?
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.

This has been driving me crazy lately. I think we should encourage people to use guard.dist more.

I have been experimenting with the InGuardDist trigger for a characters AI, thinking that I could get a general idea of the enemy's hitbox or at least when the character was in an unsafe situation. That's when I realized a ton of the characters in my roster cause others to guard even if they are throwing a light punch with hardly any reach, with half the stage between them. Which looks pretty silly for AI or a User just trying to walk backwards.