ForceMakeTemporary
not ratedSimilar to GroupMakeTemporary, this function destroys the force after the calling thread has finished, or when the calling thread sleeps.
function ForceMakeTemporary_Child takes nothing returns nothing
local force f = bj_FORCE_ALL_PLAYERS
call TriggerSleepAction(0)
call DestroyForce(f)
set f = null
endfunction
function ForceMakeTemporary takes force f returns force
local force t = bj_FORCE_ALL_PLAYERS
local trigger dispatcher = CreateTrigger()
set bj_FORCE_ALL_PLAYERS = f
call TriggerAddAction(dispatcher, function ForceMakeTemporary_Child)
call TriggerExecute(dispatcher)
call DestroyTrigger(dispatcher)
set bj_FORCE_ALL_PLAYERS = t
set dispatcher = null
return f
endfunctionNo comments.