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.
[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 = 187, 718 ; -1 is the default
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 =
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.
sparkno = SIfElse((var(1)=1),1000,1005)
sparkno = IfElse((var(1)=1),S1000,S1005)
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.
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.
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.
Some properties or engine quirks of HitDefs that aren’t really well documented.
- HitDefs with ground.type=None are non-interrupting, deal no damage, don’t force the target into a hit state, etc. They also don’t grant targets or set MoveHit, MoveContact. But properties p1stateno, p2stateno, chainID will all work on these HitDefs, so it’s possible to use p1stateno or chainID to detect when a non-interrupting hit connects and then deal damage via a permanent target bug instead. Kind of has a niche use for attacks which you don’t want to interrupt the enemy with (it almost appears visually as if the opponent has armor, even though they don’t).
This is technically incorrect since it still does make hitdefs interrupt targets, but they just end up with no hittime and no hitshaketime to the point it's unnoticeable.
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
It's generally recommended to use the TargetState (http://mugenguild.com/forum/topics/targetstate-sctrl-169309.0.html) controller from within Player1's files instead in order to avoid these issues.What trigger do I need to use for the TargetState to check if the attack hit the opponent?