Warcraft III resources & community, 2003–2006 · archived

LocationMakeTemporary

not rated
Submitted by PepparVariable Change0 downloads
See GroupMakeTemporary for description.

I haven't tested this function in-game, but the syntax is ok, and it *should* work.

Source

function LocationMakeTemporary_Child takes nothing returns nothing
    local location l = bj_enumDestructableCenter
    call TriggerSleepAction(0)
    call RemoveLocation(l)
    set l = null
endfunction

function LocationMakeTemporary takes location l returns location
    local location t = bj_enumDestructableCenter
    local trigger dispatcher = CreateTrigger()
    set bj_enumDestructableCenter = l
    call TriggerAddAction(dispatcher, function LocationMakeTemporary_Child)
    call TriggerExecute(dispatcher)
    call DestroyTrigger(dispatcher)
    set bj_enumDestructableCenter = t
    set dispatcher = null
    return l
endfunction

Comments

0

No comments.