• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 =)
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
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