HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Thorns aura that returns all damage taken

01-23-2006, 07:49 PM#1
qwertyui
Basically i want to make a thorns aura skill, which returns not only meelee, but ranged, spell and all other kinds of damage as well.

Seeing as how there are no appropriate fields in aura ability, how do i trigger it?

I was thinking about creating a unit takes damage event, but that is only linked to specific units, so it seems i will need to dynamically create and destroy triggers, thinking of which makes my head hurt.

Need some advice here :)
01-23-2006, 08:00 PM#2
Anitarf
Dynamically creating and destroying triggers is no big deal. Once you get that done, it's rather simple. All you need to do is when a unit takes damage, check if it has the buff of the aura (which would be just a dummy aura without any effect except that it gives a buff) and in that case, deal an equal ammount of damage to the damage source. Note that if both the attacker and the defender are under the effect of an aura, this will create an infinite damage loop, so you might want to take precautions and ignore the aura's damage effect (how you do that, I don't know, either turning off temporarily the damage detect trigger of the unit that is taking returned damage, or using dummy units as sources of the aura's damage and making the aura not return damage if the damage source is a dummy unit)
01-23-2006, 09:37 PM#3
qwertyui
...
Actually i already have the units in place who, besides performing their main function, can also serve as dummies.

kk big thnx @ Anitarf :)
01-24-2006, 09:25 PM#4
Mystic Prophet
well If you don't have very many preplaced units or if you do, don't mind it lagging a bit. You can pick all units on the map remove them and then creat the unit type of picked unit at position of picked unit. Or you can use game cache if your using heroes or object manager.

after replacing all the units. have a trigger that goes as follows

Code:
Events: A unit enters entire map
Conditions:
Actions: Add to thorns (name of trigger that makes thorns ability work) the event "entering unit takes damage."
01-25-2006, 12:55 AM#5
Vexorian
I think that in this case it is better to dynamically create the triggers just for the units affected by the aura