That removes a the memory leak of an unitgroup which you create AFTER this script.JASS:set bj_wantDestroyGroup = true
Custom Script: (set bj_wantDestroyGroup = true)
unitgroup - pick every unit in units of type (footman) and do (kill picked unit)
If a unit with REINCARNATE died, then came back to life, how would I set it back on course?
set region[0] = region001
set region[1] = region002
etc.
Unit enters region[0]
set custom value of unit to custom value of unit +1
Unit enters region[1]
set custom value of unit to custom value of unit +1
etc.
Events:
unit dies
Condition:
unittype of dying unit is equal to (REINCARNATOR)
Action:
Custom Script: (local unit a = GetTriggerUnit ())
wait >>revivetime<<
Custom Script: (set udg_TempUnit = a)
Order (TempUnit (variable)) to move to region[customvalue of unit...)
Events:
unit dies
Condition:
unittype of dying unit is equal to (REINCARNATOR)
Action:
Custom Script: (local unit udg_TempUnit = GetTriggerUnit ())
wait >>revivetime<<
Order (TempUnit) to move to region[customvalue of (TempUnit)]
He wouldnt want to move instantly
"Order dying unit to move to point"
as far as i know, you cant detect when a passive ability triggers
Events - A unit dies
Conditions -
triggering unit is not in unitgroup
unit-type of triggering unit equal to BLah
Actions
add triggering unit to unitgroup
set temppoint = position of triggering unit
create 1 (unit-type of triggering unit) at temppoint
Custom script call RemoveLocation(udg_temppoint)