YesNoOk
avatar

Gain health on hit? (Read 164 times)

Started by Burning_Typhoon, January 05, 2013, 03:40:48 pm
Share this topic:
Gain health on hit?
#1  January 05, 2013, 03:40:48 pm
  • ***
I want the attacker to gain health whenever he hits his enemy, so that it gives off a sense of absorbing life from the other player.

If an attack does 30 points damage, I want him to gain 30 points of damage if it hits.  I'm going to say even on chip.  I want him cheap..  I'm trying stuff, but, he keeps gaining life just by doing the attack.  I do want it to come in contact with the enemy first..

While we're at it, his life is set at 600, but, I don't want him to start the match off with that much.. Perhaps 100
Last Edit: January 06, 2013, 09:09:04 am by Burning_Typhoon
Re: Gain health on hit?
#2  January 05, 2013, 03:45:06 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
-2
lifeadd
trig1 = movecontact = 1 && numtarget
trig1 = target,movetype = H && !target,hitover && target,time <= 1
val = target,gethitvar(damage)
ignorepause = 1
Re: Gain health on hit?
#3  January 05, 2013, 03:55:48 pm
  • ***
I'm afraid I can't make much sense of what you wrote.  I put that on the same state as the attack, and did this..

[state 207]
type =lifeadd
trigger1 = movecontact = 1 && numtarget
trigger2 = target,movetype = H && !target,hitover && target,time <= 1
val = target,gethitvar(damage)
ignorehitpause = 1

Got no clue on what to do with the "val" thing on the 5th line.

EDIT: WOW!!
I FIGURED IT OUT.  IT WORKS..  dunno why you didn't type the whole thing out, but, thanks a lot anyway..  But, I'm thinking that this is too much life gain now... lol..  how about if i want it to be 25% of the attack and not 100%
Last Edit: January 05, 2013, 03:59:14 pm by Burning_Typhoon
Re: Gain health on hit?
#4  January 05, 2013, 04:00:16 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Re: Gain health on hit?
#5  January 05, 2013, 04:09:58 pm
  • ***
I've just never seen anyone put two consecutive lines of trigger=1.  But, great, it works regardless.  The last thing is that I don't want the character to start with 100% health.
Re: Gain health on hit?
#6  January 05, 2013, 04:17:44 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Re: Gain health on hit?
#7  January 06, 2013, 09:08:11 am
  • ***
Yes, I will read them.  I'm actually going to do that now.  Thanks a lot.