• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Unit death as condition?

Not open for further replies.
Level 3
Dec 28, 2007
Is there any way to check if GetSpellAbilityId() kills a unit? Like for example:

  1. A unit casts xxx ability on enemy
  2. ability of type xxx
  3. target of abilty being cast dies
  4. do xxx actions

Is that possible to check? (number 3)

Edit would I use something like this?

function Spell_Kill takes nothing returns nothing
    local unit Spell_Targ = GetSpellTargetUnit()
    call TriggerSleepAction(.5)
    if ( GetUnitState(Spell_Targ, UNIT_STATE_LIFE) <= 0 ) then
        //Do actions here
    set Spell_Targ = null
Not open for further replies.