• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Unit Self Destruction Ability

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
Hi,
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.

Bonus:
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
Joined
Apr 23, 2011
Messages
527
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.
 
Status
Not open for further replies.
Top