• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

'Brain-Sap'-like spell

Status
Not open for further replies.
Level 4
Joined
Feb 25, 2010
Messages
73
Hello. In my last post i received much priceless help, so i back with another problem:

I want to do a spell that damages the target AND, at same time, heals the caster in the same amount of damage. I did try a bunch of triggers but my result was a effect that didn't kill the target (this set the life of the target to 'life of target - X', where X was the damage, but if the target has 1 HP and the damage was 200, the target automatically goes to 199 HP...)

Please, someone can help me wih the creations of trigger (and answer if this can be done without triggers?)
 
Level 4
Joined
Feb 25, 2010
Messages
73
but what armor have to do with that? it is the responsible for the additional life that the target gains?

i also tried to do a spell with a 'Frost Bolt': i edited the damage, removed the art effects and did a trigger ''when a unit casts a spell, and the spell is equal to Name of Spell, so set the life of casting unit to Life of casting unit + damage dealt".

it works for the part of gain life, but fail at the damage (o_O): if the target is with less life that the damage, so it apparently GAIN life (like i tell before, if it has 1 hp and the damage is 200, the unit go to 199 life oO)
 
Level 8
Joined
Jan 8, 2010
Messages
493
Maker just told you to use Unit - Damage Target instead of using Unit - Change Life To Value on the damaged unit. This will cause your casting unit to actually damage the target with an amount that will damage them - since you're triggering the spell.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Yeah, I assumed you wanted to do full damage because you used "set life to...".

Just use "unit - damage target".

Do you want to heal the caster by the damage that is actually done or by the damage that is not reduced by armor? If it's the first option, you need to use damage detection. Search will help there.
 
I am not completly sure :/

But you could use silvanas ability "life drain" and set its durotation to 1 and the damage to 200

or you check the item ability "drain mana" maybe it has an option for life?

if you'll use this its better to set duration to .01... anyway maker's suggestion is more flexible...
 
Status
Not open for further replies.
Top