YesNoOk
avatar

MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI) (Read 2756 times)

Started by DosKillerFighterTrue, May 24, 2025, 11:26:26 am
Share this topic:
MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
#1  May 24, 2025, 11:26:26 am
  • avatar
  • **
    • Argentina
Hi, I'm experimenting with the Jago ki char author = "Niragla93"
" when I'm doing a long combo, for example, the helper or projectile or the p2 hits me when I'm at 0 health and I die instantly, just like it happens with ki or 2013 (when fighting Gargos in Shadow Lords, the minions interrupt your long combo). I was trying to figure this out on my own but failed.

I've tried many methods: use trigger1 = enemy, movetype = H, root, movetype = A, p2movetype, statemove, but nothing happens.

Code:
[Statedef 2005]
type    = S                     
movetype= A                     
physics = S                     
juggle  = 1                     
velset = 0,0                   
ctrl = 0                     
anim = 2005
sprpriority = 2
hitcountpersist = 1

[State Test]
type = mapset
trigger1 = 1
map = "COMBO"
value = 1
ignorehitpause = 1

[State Test]
type = mapset
trigger1 = 1
map = "Narrador_Combos"
value = 1
ignorehitpause = 1



[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 1 || animelem = 22
x = 27

[State 200,voz]
type = PlaySnd
trigger1 = AnimElem = 1 || animelem = 5
value = S200,random%7
volumescale = 999
ignorehitpause = 0
channel = 20

[State 200,voz]
type = PlaySnd
trigger1 = AnimElem = 10
value = S200,9
volumescale = 999
ignorehitpause = 0
channel = 20

[State 200, zumbido]
type = PlaySnd
trigger1 = AnimElem = 3 || animelem = 9
value = S202, 1 +random%3
volumescale = 200

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem = 1
x = p2bodydist x

[State 200, zumbido]
type = PlaySnd
trigger1 = AnimElem = 17
value = S202, 8
volumescale = 100

[State 1]
type = HitDef
trigger1 = ANIMELEM = 6
attr = S, NA
damage = 26,3;ok
animtype = Light
getpower = 30
givepower = 15, 8
guardflag = HA
hitflag = MAFD
priority = 4, Hit
pausetime = 2, 8
sparkno = 2
guard.sparkno = 2
sparkxy = -20,-20
hitsound = S203,4
guardsound = S204,1
guard.velocity = -4
ground.type = High
ground.slidetime = 12
ground.hittime = 60
guard.ctrltime = 30
ground.velocity = -1
air.type = Low
air.velocity = -1, -3
air.hittime = 10
down.velocity = -1, -3
ground.cornerpush.veloff = -1
forcestand = 1
hitonce = 1
envshake.time = 15
envshake.freq = 60
envshake.ampl = 1
kill = 0
fall.kill  = 0
guard.kill = 0

[State 1]
type = HitDef
trigger1 = ANIMELEM = 18
attr = S, NA
damage = 26,3;ok
animtype = medium
getpower = 30
givepower = 15, 8
guardflag = HA
hitflag = MAFD
priority = 4, Hit
pausetime = 2, 8
sparkno = 2
guard.sparkno = 2
sparkxy = -30, -80
hitsound = S203,6
guardsound = S204,1
guard.velocity = -4
ground.type = High
ground.slidetime = 12
ground.hittime = 60
guard.ctrltime = 30
ground.velocity = -1
air.type = Low
air.velocity = -1, -3
air.hittime = 10
down.velocity = -1, -3
ground.cornerpush.veloff = 0
forcestand = 1
hitonce = 1
envshake.time = 15
envshake.freq = 60
envshake.ampl = 2
kill = 0
fall.kill  = 0
guard.kill = 0

[State 1]
type = HitDef
trigger1 = ANIMELEM = 28
attr = S, NA
damage = 26,3;ok
animtype = hard
getpower = 30
givepower = 15, 8
guardflag = HA
hitflag = MAFD
priority = 1, Hit
pausetime = 2, 8
sparkno = 2
guard.sparkno = 2
sparkxy = -30,-20
hitsound = S203,9
guardsound = S204,1
guard.velocity = -3
ground.type = High
ground.slidetime = 12
ground.hittime = 30
guard.ctrltime = 30
ground.velocity = -1
air.type = Low
air.velocity = -1, -3
air.hittime = 10
down.velocity = -1, -3
ground.cornerpush.veloff = 0

forcestand = 1
hitonce = 1
envshake.time = 10
envshake.freq = 60
envshake.ampl = 3
kill = 0
fall.kill  = 0
guard.kill = 0

[State ]
type = Helper
trigger1 = movehit
ID = 29
stateno = 30
pos = 0,600
postype = p2
persistent = 0
ignorehitpause = 1

[State ]
type = Helper
trigger1 = animelem = 27
trigger1 = movehit
ID = 29
stateno = 27
pos = 0,600
postype = p2
persistent = 0
ignorehitpause = 1

;[State 181, 1]
;type = NotHitBy
;trigger1 = 1
;triggerall =! map (Finish)
;trigger2 = p2life < 0
;value = SCA
;time = 1

[State -2, Self-hurt if hitting]
type = TargetLifeAdd
triggerall =! map(Finish)       ; is not in the "finish him" state
trigger1 = life <= 0
trigger1 = enemy, movetype = H
trigger1 = NumTarget > 0
value = -1
kill = 1
absolute = 1


[State 200, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

And if you don't understand my idea, I can show you the video, which would be better.
(I didn't find many examples online)


I tried my best to explain well what I want to do.

Thanks in advance.

Sorry if there's a Spanish word, I'm using Google Translate.
Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
#2  May 24, 2025, 11:30:05 pm
  • *****
  • Shame on you!
    • USA
You haven't made clear the problem. You've only stated what happens. There's no question for us to answer, so I'm going to guess what you want.

It seems like you want P2 to die if P1 gets hit in the Ultra Combo. This would be done with a SelfState switching when P2 has 0 life and P1 isn't in it's state. I THINK this should work. Possibly. It's been a long time since trying something like this. Put this in your character, in the State P2 is in when they're getting hit. If it switches states, you need to paste this into all of the custom states P2 goes into. If there's a custom state P2 goes into for the last hit, you can change the 5000 to that value and it should work.

[State 718]
type = SelfState
triggerAll = !gethitvar(isbound)
trigger1 = Alive = 0
value = 5000
vVv Gouken718 vVv
Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
#3  May 25, 2025, 01:22:42 pm
  • avatar
  • **
    • Argentina
You haven't made clear the problem. You've only stated what happens. There's no question for us to answer, so I'm going to guess what you want.

It seems like you want P2 to die if P1 gets hit in the Ultra Combo. This would be done with a SelfState switching when P2 has 0 life and P1 isn't in it's state. I THINK this should work. Possibly. It's been a long time since trying something like this. Put this in your character, in the State P2 is in when they're getting hit. If it switches states, you need to paste this into all of the custom states P2 goes into. If there's a custom state P2 goes into for the last hit, you can change the 5000 to that value and it should work.

[State 718]
type = SelfState
triggerAll = !gethitvar(isbound)
trigger1 = Alive = 0
value = 5000

Thanks for understanding what I was trying to say. If you didn't understand, I was going to add an example like Peach dying to a helper like Bob-omb just as Jago is doing a long combo. I forgot to add that in the video.

I tried the solution you gave me, and unfortunately it didn't work. P2 doesn't die, even if she has 0 health. I've already added the code to all of Peach's custom states, but it still doesn't work.

Also, I'd like to avoid having to manually paste that same code into every custom character I download. Since I created the combo system without ender, thanks to TargetLifeAdd, the opponent would die instantly without finishing the combo and without having to paste the code manually.
 
Code:
[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall =! map (Finish) ; para que el ultra se active solo si hemos ganado el primer round
trigger1 = animelem = 21
trigger2 = p2life < 0
value =  -1
kill = 1
absolute = 1
Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
#4  May 26, 2025, 01:30:46 pm
  • *****
  • Shame on you!
    • USA
when you talk about the character's names, it doesn't help. Peach is P2. P1 would have the code to kill P2. P1 is always the character you're working on.
P2 should be in a custom state inside P1's code. You won't copy anything into a 3rd character once P1 has P2 working correctly.

"Thanks for understanding what I was trying to say. If you didn't understand, I was going to add an example like Peach dying to a helper like Bob-omb just as Jago is doing a long combo. I forgot to add that in the video."
This has me more confused. So is Jago going to have a helper/projectile that can interrupt his Ultra Combo? I don't know why Peach would be hit by her own helper.

I think your best solution is to not allow Jago to get hit once the Ultra Combo has started. The easiest way to do this is to remove his hit boxes and rely on use Target controls to affect P2. If you want P1 to be able to get hit and have P2 die You could spawn a helper. You might want to use StateDef -2 to watch if P1 is hit and his previous state is the Ultra Combo and spawn a full screen hit box to kill P2.
vVv Gouken718 vVv
Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
#5  May 26, 2025, 02:56:26 pm
  • avatar
  • **
    • Argentina

This has me more confused. So is Jago going to have a helper/projectile that can interrupt his Ultra Combo? I don't know why Peach would be hit by her own helper.


I'll show it to you so you understand a little.



[State 1962, 2]
type = HitDef
trigger1 = time = 0
attr = A, SP
animtype  = DiagUp
damage    = 75,10
getpower = 60
givepower = 20
guardflag =
hitflag = MAFD
pausetime = 0,9
sparkxy = 0,-25
hitsound   = s5,4
guardsound = 6,0
guard.sparkno = 40
ground.type = high
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -3, -8
air.velocity = -3,-8
fall = 1
fall.recover=0
palfx.time = 50
palfx.invertall = 1
palfx.color = 0
palfx.add = 40,-70,-200
palfx.sinadd = 40,30,0,10
AffectTeam= both

What we discover is that this part of the code is what makes Peach her own helper.
getpower = 60
givepower = 20

Quote
I think your best solution is to not allow Jago to get hit once the Ultra Combo has started.

That's what I did!
[State 181, 1]
type = NotHitBy
trigger1 = 1
triggerall =! map (Finish)
trigger2 = p2life < 0
value = SCA
time = 1

but on several occasions that sometimes p2 can survive without having hiboxes or using his helper is what makes him invulnerable when he is at 0 health. I don't know if I explained it well but oh well (sorry if my explanation is bad, this topic is somewhat complicated to explain). so I was looking for an alternative instead of using NotHitBy.

Quote
If you want P1 to be able to get hit and have P2 die You could spawn a helper. You might want to use StateDef -2 to watch if P1 is hit and his previous state is the Ultra Combo and spawn a full screen hit box to kill P2.

I'll try... (I just don't know how to create the helper after P1 gets hit. I'm still a beginner.)
Last Edit: May 26, 2025, 03:06:46 pm by DosKillerFighterTrue
Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
#6  May 28, 2025, 07:52:55 am
  • avatar
  • **
    • Argentina
What I saw in the documentation suggests that TargetLifeAdd or HitDef doesn't work to kill P2, unless I hit P2 with hiboxes. But I'd like to try out Helper because it would be a lot of fun. I just don't know how to code for Helper after P1 is hit.