• 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.

Feedback ability with cold arrows

Status
Not open for further replies.
Level 5
Joined
Jul 13, 2010
Messages
84
I need to trigger a feedback ability that drains 10mp x lvl of ability (which i know how to do) and it needs to be triggered because this unit also has cold arrows. How do i trigger the ammount of mana burned each time the unit hits someone?
TY +rep to helpers =)
 
You need to make a trigger that registers when a unit is damaged. This is a pretty advanced concept when done in a "good" way that won't leak.

Sorry if this is too complicated, but here goes:

You need dynamic triggers. That means triggers that create triggers.
You need a system that registers when any (all) units are damaged.
You need to check the source of that damage.

Then you apply your effect.

Edit: This is the best tutorial I could find on making attack-detection. WARNING: This uses the oldschool H2S() bug. Blizzard patched it and as such this tutorial is basically useless.
http://www.hiveworkshop.com/forums/...80/attack-damage-detection-engine-jass-33123/

Edit2: Rather than use a tutorial, you might consider using a system/library:
http://www.wc3c.net/showthread.php?t=108009
http://www.wc3c.net/showthread.php?t=100618
 
Last edited:
Status
Not open for further replies.
Top