- Joined
- Sep 19, 2006
- Messages
- 152
In the following, is it necessary to do the whole "set r =" thing, or is the second trigger more efficient? I'm not really sure how the whole rect/region thing works?
or
JASS:
function InitTrig_CaveEntrance takes nothing returns nothing
local region r = CreateRegion ()
//
set gg_trg_CaveEntrance = CreateTrigger ()
call RegionAddRect (r, gg_rct_Cave)
call TriggerRegisterEnterRegion (gg_trg_CaveEntrance, r, null)
set r = null
call TriggerAddCondition (gg_trg_CaveEntrance, Condition (function CaveEntrance_Condition01))
call TriggerAddAction (gg_trg_CaveEntrance, function CaveEntrance_Action01)
endfunction
or
JASS:
function InitTrig_CaveEntrance takes nothing returns nothing
set gg_trg_CaveEntrance = CreateTrigger ()
call TriggerRegisterEnterRegion (gg_trg_CaveEntrance, gg_rct_Cave, null)
call TriggerAddCondition (gg_trg_CaveEntrance, Condition (function CaveEntrance_Condition01))
call TriggerAddAction (gg_trg_CaveEntrance, function CaveEntrance_Action01)
endfunction