- Joined
- Sep 19, 2006
- Messages
- 152
I'm pretty new to using takes/returns functions, so I have a silly question. In the proceeding function, does "trig_unit" need to be nulled?
JASS:
function PlayerUnitDeathHero_RevivalTimerFunction takes unit trig_unit, integer trig_unitQ, integer R returns nothing
local integer n = (udg_PlayerScore [trig_unitQ] / 2500) + R
local real m = (I2R (n) * udg_RealArray [trig_unitQ + 200]) + udg_RealArray [trig_unitQ + 140]
local unit u = CreateUnit (Player (trig_unitQ), 'hsor', GetUnitX (trig_unit), GetUnitY (trig_unit), 0.00)
set udg_PlayerRezWait [trig_unitQ] = R2I (m)
call UnitApplyTimedLife (u, 'BTLF', m)
set u = null
endfunction