Trinity MUGEN

MUGEN => Tips, Tricks, and Tutorials. => Topic started by: Websta on April 21, 2013, 06:38:21 AM

Title: Healing
Post by: Websta on April 21, 2013, 06:38:21 AM
I've run into a little bit of trouble, and hoping somebody can help me out with this.

If you had an attack which is supposed to heal an opponent or give them power, how would you code that? Also, the opponent's state must not change at all.
Title: Re: Healing
Post by: Jesuszilla on April 21, 2013, 03:03:29 PM
TargetLifeAdd, TargetPowerAdd, or in the hitdef you could use givepower and use negative damage values.
Title: Re: Healing
Post by: Websta on April 21, 2013, 03:10:06 PM
Lifeadd requires a custom state
Hitdef changes P2 to state 5000 even if the stun is set to 0
TargetLifeAdd requires a target, target becomes available if p2 is hit

I can get it to work. However I don't want P2 to be interrupted at all. God forbid the sort of glitches that can cause.
Title: Re: Healing
Post by: KoopaKoot on April 24, 2013, 01:19:47 AM
You'll probably have to affect them for just a moment then send them back to neutral or their previous state.

[Statedef N]
physics = N
ctrl = 0

[State N]
type = SelfState/Destroyself
trigger1 = IsHelper
value = prevstateno ;or remove this if it's destroyself

[State N]
type = SelfState
trigger1 = !IsHelper
value = 0/prevstateno
ctrl = 1
Title: Re: Healing
Post by: Websta on April 24, 2013, 04:47:44 AM
Makes sense, but some characters might go haywire if they're interrupted in the middle of a state.
Title: Re: Healing
Post by: Jesuszilla on April 24, 2013, 03:27:48 PM
Really depends, actually. If it's an attack, then they should have based most triggers on AnimTime or AnimElemTime in the first place. Otherwise, as long as you're not changing their animation in the custom state, it will not disrupt playback... until they re-enter their state, in which case, yeah, the animation will most likely restart.

What you could do is have the hit (as through a helper) persist until they are back to a neutral state (stateNo = [0,20]) and have it only hit then.
Title: Re: Healing
Post by: Websta on April 24, 2013, 04:29:40 PM
That's a really clever idea. But what if that attack state gets canceled into... A ranbu attack? The heal would kick nearly 5 seconds after the heal was supposed to happen. And god forbid that ranbu is dreamcanceled or some sh1t into another ranbu.
Title: Re: Healing
Post by: Jesuszilla on April 24, 2013, 04:59:22 PM
Yes, it will delay the timing of the heal, but it won't matter. There are 2 cases:


For case 2, I think MUGEN will reset the hittime and fuck up the opponent's combo if you decide to heal them even when moveType = H. It's possible that you could cover it up by claiming, "HYPER HEAL!"
Title: Re: Healing
Post by: Websta on April 25, 2013, 12:44:13 AM
Thanks you guys, for taking the time to reply to this topic. Fuck this healing move.
Title: Re: Healing
Post by: DivineWolf on April 25, 2013, 01:18:17 PM
Lol! Well, that's one way to solve it all. I was actually interested in this topic myself. Due to some things I may have wanted to do in the future. It was pretty informative.