I am trying to make a damage reflect unit that deals a percentage of damage back to the unit/s that are attacking it. (Similar to Diablo III Damage reflect mobs)
I am assuming there is something in the damage response field in the behavior buff that would apply this effect correct? The question is, which one and what specifically does damage response refer to? The unit with the behavior or other units attacking it? Let's also assume this unit with the damage response does not actually have a weapon, it simply deals damage to targets that attack it.
i believe the most convenient and easiest to scale method for this is to use triggers., how ever if you want to use data you will have to use a lot of validators, swtitch and damage effects because as far as i know the data editor contains no simple way to damage an attacking unit based on a fraction of the attackers own damage.
I believe the Damage Response refers too the unit with the behavior.
a mistake i always make is forgetting to set the damage response Chance to something more than zero.
Here is what I ended up doing. I actually used triggers as you suggested.
<<
damage reflect towers
Events
Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
Local Variables
damage amount = 0.0 <Real>
Conditions
(Unit type of (Triggering unit)) == Damage Reflect Tower
Actions
Variable - Set damage amount = (Triggering damage taken)
Environment - Deal damage using (desired effect) on (Damaging unit) from (Triggering unit) with damage amount extra damage
I am trying to make a damage reflect unit that deals a percentage of damage back to the unit/s that are attacking it. (Similar to Diablo III Damage reflect mobs)
I am assuming there is something in the damage response field in the behavior buff that would apply this effect correct? The question is, which one and what specifically does damage response refer to? The unit with the behavior or other units attacking it? Let's also assume this unit with the damage response does not actually have a weapon, it simply deals damage to targets that attack it.
i believe the most convenient and easiest to scale method for this is to use triggers., how ever if you want to use data you will have to use a lot of validators, swtitch and damage effects because as far as i know the data editor contains no simple way to damage an attacking unit based on a fraction of the attackers own damage.
I believe the Damage Response refers too the unit with the behavior.
a mistake i always make is forgetting to set the damage response Chance to something more than zero.
has been asked alot of times here, the terms to search are "thorn aura". it uses negative leech valus.
http://www.sc2mapster.com/forums/development/data/62712-thorn-aura-how-to-return-damage/
@Dragon282: Go
Here is what I ended up doing. I actually used triggers as you suggested.
<< damage reflect towers Events Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects) Local Variables damage amount = 0.0 <Real> Conditions (Unit type of (Triggering unit)) == Damage Reflect Tower Actions Variable - Set damage amount = (Triggering damage taken) Environment - Deal damage using (desired effect) on (Damaging unit) from (Triggering unit) with damage amount extra damage
@Dragon282: Go
@onlyleviathan: Go
@onlyleviathan: Go
Sorry about the formatting mistake.
<<code>>
Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
Local Variables
damage amount = 0.0 <Real>
Conditions
(Unit type of (Triggering unit)) == Damage Reflect Tower
Actions
Variable - Set damage amount = (Triggering damage taken)
Environment - Deal damage using (any effect) on (Damaging unit) from (Triggering unit) with damage amount extra damage
<<code>>