YesNoOk
avatar

Can't hit falling opponent (Read 3640 times)

Started by Trackiest head, March 11, 2020, 01:17:00 pm
Share this topic:
Can't hit falling opponent
#1  March 11, 2020, 01:17:00 pm
  • **
  • Get yer gear up!
    • Spain
Hello guys, I'm having a tiny issue with an attack I'm coding.
The attack consists on a buzzsaw that launches the opponent into the air, causing the opponent to fall into the blade to deal damage for some ticks.
But the problem is on the second part of the attack, for some reason even when the hitflag is set to MAF the falling opponent clips through the red hitbox.
Here's the coding:
Code:
[statedef 1601]
type    = S
movetype= A
physics = S
poweradd = 0
anim = 1601
velset = 0,0
ctrl = 0

[State 1601, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = up          ;light,medium,hard,back,up,diagup
air.animtype = heavy
priority = 2,Hit
pausetime = 6 ,10
sparkno = S3000
guard.sparkno = S3100
sparkxy = 0,0
hitsound = S1,0
guardsound = S2,0
ground.type = High      ;Low,Trip,None
ground.velocity = 0,-13
air.velocity= 0,-10
air.hittime = 50
fall = 1
y.accel = 1.4
fall.recover = 0
 
[State 1601, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 1602

[statedef 1602]
type    = S
movetype= A
physics = S
poweradd = 0
anim = 1602
velset = 0,0
ctrl = 0

[State 1602, HitDef]
type = HitDef
trigger1 = animelem = 1
trigger1 = animelem = 2
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF       ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = heavy
priority = 2,Hit
damage = 5,1
pausetime = 6 ,6
sparkno = S3000
guard.sparkno = S3100
sparkxy = 0,0
hitsound = S1,0
guardsound = S2,0
ground.type = high      ;Low,Trip,None
air.hittime = 20
ground.velocity = 0,0
air.velocity = 0,0
fall.recover = 0
envshake.time = 4

[State 1602, ChangeState]
type = ChangeState
trigger1 = time > 120
value = 1603

Last Edit: April 23, 2020, 03:14:03 pm by Trackiest head
Re: Can't hit falling opponent
#2  March 11, 2020, 03:23:13 pm
  • ****
    • crepa.neocities.org
I'm not sure, but try adding D in the hitflag (so it becomes MAFD), maybe?

DW

Re: Can't hit falling opponent
#3  March 11, 2020, 03:28:13 pm
  • *****
    • USA
    • www.trinitymugen.net
D = Downed(OTG)

The only thing I see is for the second hitdef, you have two "trigger1" prompts. I'm pretty sure you want it to read trigger1 -> trigger2 for consecutive activation. Doesn't look like you're using any juggle points for it. Not sure if you're using Mugen's juggle system, or a custom one. You'll want to double check though, if the latter. Also, if the former, I'm not sure though Mugen may add points on it own if omitted...?

You may also want to double check the anims and make sure you are putting the right elems for the triggers.
Re: Can't hit falling opponent
#4  March 11, 2020, 03:30:30 pm
  • ****
    • crepa.neocities.org
Oh, yeah, didn't notice the double trigger1. My bad.
Re: Can't hit falling opponent
#5  March 11, 2020, 08:17:11 pm
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 So, you want P2 to come to a halt when they fall into the saw, right? You have two solutions if so.

1. Use targetbind so that they temporarily attach to a certain part of the buzzsaw.
2. Use targetvelset with y = 0 whenever the buzzsaw hits during the second state.

 Also, avoid using time = 0 for hitdefs since there is a bug that causes moves with that trigger to become unblockable in certain instances (like blockstrings). Something like time = 1 would work better.
Re: Can't hit falling opponent
#6  March 12, 2020, 12:28:15 pm
  • **
  • Get yer gear up!
    • Spain
Okay, it seemed that having two trigger1's seemed to mess up the procedure. Silly me.
Re: Can't hit falling opponent
#7  April 07, 2021, 06:11:17 am
  • MUGEN character programmer
  • Hey, common!
    • Brazil
@Trackiest head

You can just put in the command lines of Hitdef type state, kill = 0, until last hitdef, the last one need to be kill = 1