The Mugen Fighters Guild

Help => Development Help => Topic started by: DosKillerFighterTrue on May 24, 2025, 11:26:26 AM

Title: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: DosKillerFighterTrue on May 24, 2025, 11:26:26 AM
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.

[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.
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: Odb718 on May 24, 2025, 11:30:05 PM
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
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: DosKillerFighterTrue on May 25, 2025, 01:22:42 PM
Quote from: Odb718 on May 24, 2025, 11:30:05 PM
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.

[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

Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: Odb718 on May 26, 2025, 01:30:46 PM
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.
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: DosKillerFighterTrue on May 26, 2025, 02:56:26 PM
Quote from: Odb718 on May 26, 2025, 01:30:46 PM

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

QuoteI 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.

QuoteIf 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.)
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: DosKillerFighterTrue on May 28, 2025, 07:52:55 AM
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.
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: Odb718 on June 03, 2025, 12:31:18 AM
You need to explain the problem from the beginning. Now you're switching to Peach as P1?
Are you trying to fix Jago?? Which character would still have an issue fighting a different character???

This post will help you create a helper. It doesn't answer all the questions. So if you have more, just ask. Feel free to create a new topic if the question doesn't revolve around this problem.
https://mugenguild.com/forum/topics/helper-sctrl-1-0-1-1b-169754.0.html

If you're having the problem with Peach and the bomb is the source of the issue
that bomb is a helper. So trying to create a helper to solve the problem, it won't.

Are you coding this for Mugen or Ikemen?

Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: DosKillerFighterTrue on June 03, 2025, 10:00:45 PM
well. really it is a problem. if you allow me... I have been trying to create the helper as you suggested, and I tried it myself without help or well, without publishing in this post but I have given up. what did I mean by trying to make it so that when I hit p2 or its own helper a helper appears that removes all the damage from p2. I already set hitdef with giant hitbox and damage = 9999 but it does not work. I already set movetype = H and nothing, and if I set movetype = A p2 dies inslitant without being hit p1.
I don't know how to write the code.
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: Odb718 on June 04, 2025, 04:07:13 PM
So the number 1 thing about getting help, from me, or from anyone, is answering their questions. I asked three questions and you have ignored them. You started the topic about Jago. Peach is the only character with the helper.
Restart a topic speaking on the direct issue.
Quote from: DosKillerFighterTrue on June 03, 2025, 10:00:45 PM
... I have been trying to create the helper...  ...by trying to make it so that when I hit p2 or its own helper a helper appears that removes all the damage from p2...
What this is asking for, is a helper that can hit the enemy, helpers or P2/P4, and heal them back to full health.
From your other replies, I don't think this is what you actually want. It seems like you're missing the terminology for what you want to have happen.

Read over this. It has a lot of basic concepts and terminology for fighting games. It wont take long, and I know you'll already know a lot of it.  https://mugenguild.com/forum/topics/expanding-mugen-class-the-mechanics-master-thread-173411.0.html
When something seems like it might be what you're interested in, follow the link. If it's not clickable, see if something near it sounds like what you want.

You issue is with a helper. Make a new post describing what it does. Then describe what you want it to do. Then ask a couple questions on how to make what happens into what you want. We'll get the problem solved.
Title: Re: MoveType doesn't work if P2/helper hit me; he survive while combo continues (KI)
Post by: DosKillerFighterTrue on June 04, 2025, 10:10:13 PM
Okay. I'm going to create a post. and read what Expanding MUGEN Class The Mechanics Master Thread says and learn.

And I didn't actually ignore the questions. I just explained what I meant. I don't really know how I could tell if you're wrong or not, so what I do is explain again with an updated video to see if you can understand now. And sometimes I struggle to understand what he's saying, and other times I use Google Translate, which sometimes alternates the words and changes them.