Locust Unit

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Do a locust skilled unit need to be remove after they're dead?

I've been seeing people doing these:
JASS:
scope RemoveDummies

private function Cond takes nothing returns boolean
    return GetUnitAbilityLevel(GetTriggerUnit(),'Aloc')>=1
endfunction

private function Act takes nothing returns nothing
    //call TriggerSleepAction(3)
    call RemoveUnit(GetTriggerUnit())
endfunction

function InitTrig_Remove_Dummies takes nothing returns nothing
set gg_trg_Remove_Dummies = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Remove_Dummies,EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddCondition(gg_trg_Remove_Dummies,Condition(function Cond))
    call TriggerAddAction(gg_trg_Remove_Dummies,function Act)
endfunction

endscope
 

istar

New Member
Reaction score
31
shouldnt this be in jass help?
i tot adding a expiration timer is good enouigh...
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>shouldnt this be in jass help?
I think this isn't scripting problem, but.. I've no idea.

>>i tot adding a expiration timer is good enouigh...
I believed in that too.
 

Akolyt0r

New Member
Reaction score
33
but dont forget to null the local variable...
You most likely will have a local variable for it, in the function where you create the dummy.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Ok thanks.

*Every units in removed from the game once they've finished their death animation.
(Or finished the decay period if there's a decay)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top