Can anyone please explain what this short coding does ?

Started by cidiego, April 03, 2018, 10:03:59 PM

Previous topic - Next topic

cidiego

Hello friends.
I have tried but its just too complicated for me, im still learning. Could you please explain this to me ?

[State -3, LifeAdd]
type = LifeAdd
trigger1 = (GetHitVar(GroundType) = 1) || (GetHitVar(AirType) = 1)
value = Ceil(GetHitVar(Damage) * .5)

I dont get it. I guess it adds life when you get hit, but is it half the damage you get, thats returned to you in life ? Its confusing for me. Also, that (Groundtype), will it modify the var by 1, 2 or 3 ?

Help please
Thank you all for sharing!

Odb718

Not sure if you've looked at this or not
http://mugenguild.com/forum/topics/gethitvar-triggers-169647.0.html
but it should clear up some questions.
Just by looking at it, it seems to be a damage dampener.
vVv Gouken718 vVv SabreTooth718 vVv


cidiego

Thanks Odb718,
I had a look at your link, and it helped though Im still not sure.

My guess is; When you get it by a Standing or Air attack, you get half that damage back in life.
Thank you all for sharing!

inktrebuchet

That's correct, groundtype is either 1 or 0 so it covers all ground attacks.

That code would trigger for any ground or air attack and makes the character appear to have only taken half the damage.

You should probably add ignorehitpause to that code though.