Warcraft III resources & community, 2003–2006 · archived

Question on thorns-related ability

4 posts
#1

Question on thorns-related ability

Okay, so I am trying to create an ability that gives a unit a buff that gives it 100% damage return, similar to the Thorns Aura ability, but I would also like it to return the damage from targeted spells (chain lightning, firebolt, etc.) Is this possible?

I've been messing around with triggers, something like:

Event:
Any unit takes damage

Condition:
Unit has buff = Eye For An Eye ((That's what I call the spell))

Effects:
Damage (Attacking Unit) for (Damage done)

This trigger goes off, but does no damage (apparently the "Damage Done" get event doesn't work the way I'm trying to make it work. Anyone have any suggestions?
#2
First, are u sure that your event is triggering? ( since ur using WeU, did you run Initialize Advanced Functions on Map Initialization? )

Second, the buff check condition is often buggy as heck

Third, the Damage Target option also tends to be buggy :?
#3

...

Yes, the event is for sure triggering. I added an

Action:
Display chat string "!"

To the actions and, sure enough, if I had the buff and took damage it would start spamming "!", so I know it's triggering okay.

I am aware that the buff check condition and the damage taken event are sometimes... difficult, but I'm not sure how buggy they are. Buggy in what way? Buff check being really buggy would be tough, since many of the triggers in my map rely on it, (mostly) successfully right now.

I'm thinking some solution may be possible using variables, but I've been yet unable to impliment it.
#4
I'm not sure but you shouldn't use 'attacking unit'. in jass, there's GetEventDamageSource for the damaging unit, and that is different from GetAttacker... i don't know WEU but there must something like Damage Source, or Damaging Unit for that.