Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
You can create a trigger that checks when the ability is cast and then run a near-instant timer that will check if the unit is dead or not.
If I have time, I'll make a test map to show you how.
If the ability deals damage then you can detect this using a Damage Engine.
Events

Unit - A unit Starts the effect of an ability
Conditions

(Life of (Target unit of ability being cast)) Less than (Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field Damage ('Hbz2'), of Level: (Level of (Ability being cast) for (Triggering unit)))
Actions
Well this would not work for coded damage right?You can also do that :
Thus it haves it limitation since the damage will be pre mitigation from the game so if your spell deal 100dmg and the unit haves likes 200hp and 0 heavy armor it would still kill it.
Events
Unit - A unit Starts the effect of an ability
Conditions
(Life of (Target unit of ability being cast)) Less than (Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field Damage ('Hbz2'), of Level: (Level of (Ability being cast) for (Triggering unit)))
Actions
Feast Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to X

Actions


Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 50.00 damage of attack type Spells and damage type Normal


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Life of (Target unit of ability being cast)) Less than 1.00



Then - Actions




Do things



Else - Actions
It should work, use 0.31 instead of 1.00 tho.Would this work properly?
Feast Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to X
Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 50.00 damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Target unit of ability being cast)) Less than 1.00
Then - Actions
Do things
Else - Actions
Alright, problem solved i guess. thank you!Oh with coded damage it's a lot easier !
It should work, use 0.31 instead of 1.00 tho.
Conditions
(Target unit of ability being cast) Equal to No unit
Which damage event should that be?There's a Damage Event for lethal damage.
Which damage event should that be?
Game - LethalDamageEvent becomes Equal to 1.00
So how do i make this even work with a certain ability?This is the event, found in the Damage Engine.
Game - LethalDamageEvent becomes Equal to 1.00
Have a unique dummy unit cast the ability. Then check if the DamageEventSource (damaging unit) is equal to this unit.So how do i make this even work with a certain ability?
Conditions:
IsDamageSpell equal to True
Unit-type of DamageEventSource equal to Your Hero
Alright, thanks a lot mate!Have a unique dummy unit cast the ability. Then check if the DamageEventSource (damaging unit) is equal to this unit.
So your hero will cast a fake version of the spell that has no effects and then you trigger a Dummy unit to cast the real spell in response to this.
If you need access to the Hero in the LethalDamageEvent trigger you can link the Dummy unit to your Hero using a Hashtable/Unit Indexer when you first create it.
Alternatively, if this is the only damaging spell that your hero has you can do something like this:
Conditions:
IsDamageSpell equal to True
Unit-type of DamageEventSource equal to Your Hero
