Is it possible to check whether or not the target of a casted ability is killed by that ability?
What I mean is, if a unit casts an ability that does 9001 damage, is it possible to check, in triggers, whether or not the unit was killed by the ability and then do some action.
-> example, Unit uses Ability (SuperSkill)
- condition: Target of unit is killed by SuperSkill
Create global variable of type -Game Link -> Effect
Create a trigger as follows:
Event: Any unit takes damage from any effects
Local Variable: Game Link -> Effect = Triggering Effect
Local Variable: Integer = Triggering Damage Taken
Condition: lv_effect == gv_effect
Actions: IF(lv_damageTakenInt > triggerUnit Life) blah
I can't find Triggering Damage Taken for the Integer variable
also, why not just make it unit takes damage from my specific ability effect?
alright Thanks! I got it to work relatively easily. One other thing, I want to make the cost of the ability zero as well. Can I do that in triggers or do I need to do something in Data?
Is it possible to check whether or not the target of a casted ability is killed by that ability?
What I mean is, if a unit casts an ability that does 9001 damage, is it possible to check, in triggers, whether or not the unit was killed by the ability and then do some action.
-> example, Unit uses Ability (SuperSkill) - condition: Target of unit is killed by SuperSkill
Thanks
@Terminator8: Go
Create global variable of type -Game Link -> Effect
I can't find Triggering Damage Taken for the Integer variable also, why not just make it unit takes damage from my specific ability effect?
@Terminator8: Go
do that then, but that's global spec, and not local spec. So it'll occur if multiple units have that ability.
alright Thanks! I got it to work relatively easily. One other thing, I want to make the cost of the ability zero as well. Can I do that in triggers or do I need to do something in Data?
@Terminator8: Go
A simpler method would be to have a trigger
Unit takes Fatal damage from (Damage effect here)