I was just wondering if it would be efficient to have a behavior that causes a unit to cast an blank ability if it receives fatal damage (aka dies), which you can then use triggers to respond to unit deaths by the event Unit Casts Ability. My thinking follows the idea then that you would only need to simply apply this behavior to any unit type that you want to catch if it dies, and the event never fires for any other unit, thus avoiding the lag associated with "any unit dies" if tons of units die on your map.
Skip the ability, just have it fire an effect in a fatal damage response, and triggers shoild be able to catch this. The dying unit should be Source Unit in the effect. Whether this is more efficient than catching all unit deaths, I cannot say for sure. Yes unit death events fire a lot, but it's not THAT inefficient.
In case youre wondering, blank damage effects and blank search area effects both work fine as dummy effects. Just make sure if the damage effect is Spell damage that you dont have a behavior increasing spell damage, or it will do damage.
I was just wondering if it would be efficient to have a behavior that causes a unit to cast an blank ability if it receives fatal damage (aka dies), which you can then use triggers to respond to unit deaths by the event Unit Casts Ability. My thinking follows the idea then that you would only need to simply apply this behavior to any unit type that you want to catch if it dies, and the event never fires for any other unit, thus avoiding the lag associated with "any unit dies" if tons of units die on your map.
What do you think?
@playpong:
Skip the ability, just have it fire an effect in a fatal damage response, and triggers shoild be able to catch this. The dying unit should be Source Unit in the effect. Whether this is more efficient than catching all unit deaths, I cannot say for sure. Yes unit death events fire a lot, but it's not THAT inefficient.
In case youre wondering, blank damage effects and blank search area effects both work fine as dummy effects. Just make sure if the damage effect is Spell damage that you dont have a behavior increasing spell damage, or it will do damage.