I have an item, which causes my unit to heal for 10% of spell damage dealt (using leach on damage dealt). This works fine for spells that it casts itself - but I've got an ability that summons a unit dealing some damage with a behavior using a periodic search effect.
How do I make this damage dealt, count as being dealt by the unit which summoned the unit dealing damage?
I think there are fields which allow you to inherit other units indirectly. A good start would be to make sure all summons are like broodlings (they credit the summoner for kills) as that creates some form of ownership inheritance.
If all else fails you could trigger the abilities so that they locate the summoning unit and deal damage from it.
Just tested the Kills to caster behavior - it did not work. I might end up doing it with triggers then :/ I'm just worried about lag, as it for instance are units dealing AoE damage, which should heal the caster. I did get the unit with the behavior to work, as made the behavior be applied upon cast instead of just setting it in the editor.
If you have the scenario that the ability could be stacked while it shouldn't, then add a buff that executes the damage effect into the persistent (just like Psi Storm: persistent -> buff -> damage).
Yea - I tried that - and it did work, but that does not solve my problem. I also have summoned unit which simply attack with a weapon, which should also heal the caster.
Just tested the Kills to caster behavior - it did not work. I might end up doing it with triggers then :/ I'm just worried about lag, as it for instance are units dealing AoE damage, which should heal the caster. I did get the unit with the behavior to work, as made the behavior be applied upon cast instead of just setting it in the editor.
How many times per second will the caster deal damage using this at worst case? 1? 10? 100? 1,000? Only be concerned if it is in the 100-1,000 range. It also does not generate any lag as it is entirely deterministic, it might cause very poor performance however (frames dropped) but that is not lag. (poor performance is not "lag". "lag" can be indirectly the result of poor performance limiting the rate at which you can act or causing your client to fall behind in other games but poor performance itself does not produce "lag").
Quote:
Yea - I tried that - and it did work, but that does not solve my problem. I also have summoned unit which simply attack with a weapon, which should also heal the caster.
Triggering might be the best in this case. For best performance run it off a dummy effect (run every time an attack is launched). You could possible get away with some weapon based event as well but that might need extra error checking and also you probably need a dummy effect to attack anyway. The dummy effect causes the trigger to get the summoner unit (from the behaviour which declares it) and then causes the appropaite damage effect from the summoner to the dummy effect target.
Get the Create Unit effect to apply a buff to the summon. This buff then has a damage response on attacker that does the damage. As the buff knows the casting unit as the caster you can make it that the leeching effect also refers to the caster.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I have an item, which causes my unit to heal for 10% of spell damage dealt (using leach on damage dealt). This works fine for spells that it casts itself - but I've got an ability that summons a unit dealing some damage with a behavior using a periodic search effect.
How do I make this damage dealt, count as being dealt by the unit which summoned the unit dealing damage?
I think there are fields which allow you to inherit other units indirectly. A good start would be to make sure all summons are like broodlings (they credit the summoner for kills) as that creates some form of ownership inheritance.
If all else fails you could trigger the abilities so that they locate the summoning unit and deal damage from it.
@ImperialGood: Go
Just tested the Kills to caster behavior - it did not work. I might end up doing it with triggers then :/ I'm just worried about lag, as it for instance are units dealing AoE damage, which should heal the caster. I did get the unit with the behavior to work, as made the behavior be applied upon cast instead of just setting it in the editor.
No one else knows how this could be achived?
Use a Buff only for the icon. Use a persistent effect for the damaging aura.
Effect-target ability -> create persistent -> initial effect: add buff; periodic effect: damage
If you have the scenario that the ability could be stacked while it shouldn't, then add a buff that executes the damage effect into the persistent (just like Psi Storm: persistent -> buff -> damage).
@Ahli634: Go
Yea - I tried that - and it did work, but that does not solve my problem. I also have summoned unit which simply attack with a weapon, which should also heal the caster.
How many times per second will the caster deal damage using this at worst case? 1? 10? 100? 1,000? Only be concerned if it is in the 100-1,000 range. It also does not generate any lag as it is entirely deterministic, it might cause very poor performance however (frames dropped) but that is not lag. (poor performance is not "lag". "lag" can be indirectly the result of poor performance limiting the rate at which you can act or causing your client to fall behind in other games but poor performance itself does not produce "lag").
Triggering might be the best in this case. For best performance run it off a dummy effect (run every time an attack is launched). You could possible get away with some weapon based event as well but that might need extra error checking and also you probably need a dummy effect to attack anyway. The dummy effect causes the trigger to get the summoner unit (from the behaviour which declares it) and then causes the appropaite damage effect from the summoner to the dummy effect target.
Get the Create Unit effect to apply a buff to the summon. This buff then has a damage response on attacker that does the damage. As the buff knows the casting unit as the caster you can make it that the leeching effect also refers to the caster.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg