• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[JASS] Unit death as condition?

Status
Not open for further replies.
Level 3
Joined
Dec 28, 2007
Messages
46
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?

JASS:
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
    endif
    
    set Spell_Targ = null
endfunction
 
Status
Not open for further replies.
Top