wraithseeker
Tired.
- Reaction score
- 122
You should list the Pros and Cons of the system with many DD system lying everywhere, because people compare them everywhere.
private function init takes nothing returns nothing
local group g = CreateGroup()
local trigger t = CreateTrigger()
local region r = CreateRegion()
call RegionAddRect(r, bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(t, r, Condition(function INIT_GROUP))
call TriggerAddCondition(t, Condition(function INIT_GROUP))
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, Condition(function INIT_GROUP))
call TriggerAddCondition(QDD_Trigger, Condition(function LoopingThrough))
set QDD_Event = Event.create()
call DestroyGroup(g)
set g = null
endfunction
private function init takes nothing returns nothing
local group g = CreateGroup()
local region r = CreateRegion()
call RegionAddRect(r, bj_mapInitialPlayableArea)
call TriggerRegisterEnterRegion(CreateTrigger(), r, Condition(function INIT_GROUP))
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, Condition(function INIT_GROUP))
call TriggerAddCondition(QDD_Trigger, Condition(function LoopingThrough))
set QDD_Event = Event.create()
call DestroyGroup(g)
set g = null
endfunction
I hate to say it, but this does leak events. (Not that I've tested it myself, but it should, from what I've heard.) Somewhere on this thread I thought it kinda needed to state so...
I just thought approved resources had to be leakless. <_<