- Joined
- Mar 10, 2009
- Messages
- 5,016
SOLVED!
The ReplaceUnitBJ function has so many callings, now in order to simplify this, it can be...
Now forget about the 'random' coz its in another function...also forget about the statelife and mana coz Im not applying it yet...
My questions are;
1. Does the RemoveUnit leak?...
2. What's the use of bj_lastReplacedUnit?...
3. Is this the simplified setup?, well I know that there's better...
The ReplaceUnitBJ function has so many callings, now in order to simplify this, it can be...
JASS:
local unit tar = LoadUnitHandle(udg_HASH, metkey, 2)
local unit newunit
call UnitApplyTimedLife(tar, 'BTLF', 0.03)
call ShowUnit(tar, false) //Is this necessary?...
call RemoveUnit(tar)
if random==1 then
set newunit = CreateUnit(GetOwningPlayer(tar), MET_WARLOCK(), GetUnitX(tar), GetUnitY(tar), 0)
endif
Now forget about the 'random' coz its in another function...also forget about the statelife and mana coz Im not applying it yet...
My questions are;
1. Does the RemoveUnit leak?...
2. What's the use of bj_lastReplacedUnit?...
3. Is this the simplified setup?, well I know that there's better...
Last edited: