Randor244
Active Member
- Reaction score
- 34
Is there a condition I can use to check which specific ability killed a unit?
(as in, if <ability> killed this unit, do this)
(as in, if <ability> killed this unit, do this)
Impossible. Dead unit has no buffs.Make the ability add a buff to all the effected units, and then make a new trigger with:
Trigger:
- Unit dies
- Events
- Unit - Unit Dies
- Conditions
- ((Triggering unit) has buff Your buff) Equal to True
- Actions
- <Actions here>
That should do it?
You can also do it with buff detection, if the buffs have infinitesimal duration.you cant do it without triggering spell damage.
For example your spell does 50 damage. Check all units within range of the spell and if they have 50 or less life then those units get killed, so you can run the trigger.
Anyway, LiveSsenkrad's trigger should work, because that only affects a unit that dies with the buff, indicating that the spell was cast on it. But I'm not sure if the buff gets added if the unit already gets killed, though.
Make the ability add a buff to all the effected units, and then make a new trigger with:
Trigger:
- Unit dies
- Events
- Unit - Unit Dies
- Conditions
- ((Triggering unit) has buff Your buff) Equal to True
- Actions
- <Actions here>
That should do it?
What you can do, is add all the affected units to a unit group, (which you probably already did) and pick any of them and check if they are dead or not.