Z
zigzagrocket
Guest
k im confused as to how local variables work. Why does this work?
yet this does not?
do locals auto get destroyed after trigger is complete?
Code:
function MsgTriggeringPlayer takes nothing returns nothing
set udg_Kills = ( udg_Kills + 1 )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetKillingUnitBJ())), ( "Your kill count is " + I2S(udg_Kills) ) )
endfunction
yet this does not?
Code:
function MsgTriggeringPlayer takes nothing returns nothing
local integer killcount
set killcount = ( killcount + 1 )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetKillingUnitBJ())), ( "Your kill count is " + I2S(udg_Kills) ) )
endfunction
do locals auto get destroyed after trigger is complete?