Unit Self Destruction Ability

Level 8
Jun 13, 2010
Editor Question:
How do I make a summoned unit explode when entering a certain range of an enemy unit, deal damage to the enemy unit (not multiple units) and restore health to the summoning unit after explotion?

Detailed information:
I am making a Witch Doctor who can summon a Voodoo Pig. The Voodoo Pig is supposed to attack the first enemy it sees and explode when entering a certain range. The damage it deals is supposed to heal the Witch Doctor.

I would like to make the max level of the ability deal area damage, so if you can make an easy way to transform the trigger into dealing area damage instead of single target damage.
The conditions would be easy, just make sure the single target damage is for the ability from level 2 and below and area damage from 3.

Ask if I confused you.
Thank you very much for your help!
Level 9
Apr 23, 2011
hmm, try making a periodic trigger that checks if a unit is in range of the voodoo pig, then make the pig deal damage to the enemy, insert the damage done into a variable (optional), make the pig explode, then heal the witch doctor with the damage amount. for the heal, you can use a dummy ability with heal or dealing negative damage (not sure if the latter is possible) for the AoE damage, just change the pig damages unit trigger to pig damages area around pig.