YesNoOk
avatar

Can anyone please explain what this short coding does ? (Read 18473 times)

Started by cidiego, April 03, 2018, 10:03:59 pm
Share this topic:
Can anyone please explain what this short coding does ?
#1  April 03, 2018, 10:03:59 pm
  • **
    • Spain
    • cidiego@gmail.com
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!
Re: Can anyone please explain what this short coding does ?
#2  April 04, 2018, 12:12:58 pm
  • *****
  • Shame on you!
    • USA
vVv Ryuko718 Updated 10/31/22 vVv
Re: Can anyone please explain what this short coding does ?
#3  April 04, 2018, 03:30:04 pm
  • **
    • Spain
    • cidiego@gmail.com
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!
Re: Can anyone please explain what this short coding does ?
New #4  April 04, 2018, 03:54:36 pm
  • ****
    • USA
    • twitter.com/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.
Last Edit: April 04, 2018, 04:07:56 pm by ink