I've finally run into something I absolutely cannot figure out how to do with the data editor alone. I have an ability that one unit can cast on an ally that causes all damage done to that unit to be transferred back to the caster for a set amount of time. It's implemented with triggers at the moment, because I can't even begin to figure out how to do it with the data editor alone.
If anyone has any ideas I'll be very impressed :) Even hacky workarounds are probably OK.
Here's how my trigger implementation works: both the caster and the target get a buff for the duration of the effect, and whenever a unit with the target buff takes damage, the nearest friendly unit with the caster buff is selected to take the damage. While this isn't 100% correct behavior, it's near enough for what I need.
So far much of that can be done in the data editor but the tricky part is actually transferring the damage, which requires somehow passing the amount of damage done from the damage response behavior to a different effect. This is where I'm stuck at because I am honestly not sure that it's possible.
I haven't tested this at all, but could you add a behavior to all your units weapons that has a cost in hp based on the damage they do to your reflecting unit, then validate it based on a buff which is applied when the ability is cast.
I know it will end up being a lot of different behaviors for every unit, but I don't see an alternative way to do it in the data editor, unless as you suggested someone works out how to pass a variable to a effect.
It's not damage reflection, though - it's transferring damage to a 3rd unit which isn't involved in the attack at all.
I actually have the whole thing working flawlessly with as much done in the data editor as is probably possible. I did change it so it's an aura now - when activated any damage done to allies within the aura radius is redirected to the caster for 20 seconds.
That's almost like the Warcraft 3 Witch Doctor's ability to make all units in a radius invulnerable for a short time (the witch doctor is not invulnerable, so all enemies target him). That's basically what you are doing here, except that the units being affected are still considered viable targets. Could you just make the affected units invulnerable? Can that be done through a behavior?
That's almost like the Warcraft 3 Witch Doctor's ability to make all units in a radius invulnerable for a short time (the witch doctor is not invulnerable, so all enemies target him). That's basically what you are doing here, except that the units being affected are still considered viable targets. Could you just make the affected units invulnerable? Can that be done through a behavior?
I think you mean Shadow Hunter. But yes that sounds fairly plausible. Making the shield generator the only viable target also sounds like a valid alternative though. I mean it wouldn't look as nice. But so long as the shield generator only has HP and not Shields, then you could definitely make it based on it's energy. Or even just give it constant shield regen and make the effects shut down if it's shields run out.
What I want to make is "While this mode is active, nearby allies only take X% damage, and you take the remaining damage. Additionally, all damage you take is reduced by Y%.", and while the damage reduction is a simple matter, the damage transfer component has me completely puzzled.
Hi there, i'm interested to know how you did the damage redirection via triggers? My issue is that if the damage dealt is more than the target's hp, the target dies immediately instead of transfering the damage to the other unit.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've finally run into something I absolutely cannot figure out how to do with the data editor alone. I have an ability that one unit can cast on an ally that causes all damage done to that unit to be transferred back to the caster for a set amount of time. It's implemented with triggers at the moment, because I can't even begin to figure out how to do it with the data editor alone.
If anyone has any ideas I'll be very impressed :) Even hacky workarounds are probably OK.
Here's how my trigger implementation works: both the caster and the target get a buff for the duration of the effect, and whenever a unit with the target buff takes damage, the nearest friendly unit with the caster buff is selected to take the damage. While this isn't 100% correct behavior, it's near enough for what I need.
So far much of that can be done in the data editor but the tricky part is actually transferring the damage, which requires somehow passing the amount of damage done from the damage response behavior to a different effect. This is where I'm stuck at because I am honestly not sure that it's possible.
@RileyStarcraft: Go
I haven't tested this at all, but could you add a behavior to all your units weapons that has a cost in hp based on the damage they do to your reflecting unit, then validate it based on a buff which is applied when the ability is cast.
I know it will end up being a lot of different behaviors for every unit, but I don't see an alternative way to do it in the data editor, unless as you suggested someone works out how to pass a variable to a effect.
@Jazza4321:
It's not damage reflection, though - it's transferring damage to a 3rd unit which isn't involved in the attack at all.
I actually have the whole thing working flawlessly with as much done in the data editor as is probably possible. I did change it so it's an aura now - when activated any damage done to allies within the aura radius is redirected to the caster for 20 seconds.
That's almost like the Warcraft 3 Witch Doctor's ability to make all units in a radius invulnerable for a short time (the witch doctor is not invulnerable, so all enemies target him). That's basically what you are doing here, except that the units being affected are still considered viable targets. Could you just make the affected units invulnerable? Can that be done through a behavior?
I think you mean Shadow Hunter. But yes that sounds fairly plausible. Making the shield generator the only viable target also sounds like a valid alternative though. I mean it wouldn't look as nice. But so long as the shield generator only has HP and not Shields, then you could definitely make it based on it's energy. Or even just give it constant shield regen and make the effects shut down if it's shields run out.
I'm having problems with this too.
What I want to make is "While this mode is active, nearby allies only take X% damage, and you take the remaining damage. Additionally, all damage you take is reduced by Y%.", and while the damage reduction is a simple matter, the damage transfer component has me completely puzzled.
I managed to make my ability with some heavy triggering, since a data editor solution seems impossible.
Hi there, i'm interested to know how you did the damage redirection via triggers? My issue is that if the damage dealt is more than the target's hp, the target dies immediately instead of transfering the damage to the other unit.