function Trig_Untitled_Trigger_002_Func001002001 takes nothing returns boolean
return ( GetEnumPlayer() == GetTriggerPlayer() )
endfunction
function Trig_Untitled_Trigger_002_Func001002 takes nothing returns nothing
if ( Trig_Untitled_Trigger_002_Func001002001() ) then
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Untitled_Trigger_002_Func001002 )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
set gg_trg_Untitled_Trigger_002 = CreateTrigger( )
//Add for each player you want this to effect
call TriggerRegisterPlayerEventLeave( gg_trg_Untitled_Trigger_002, Player(0) ) //Player red leaves
call TriggerRegisterPlayerEventLeave( gg_trg_Untitled_Trigger_002, Player(1) ) //Players blue leaves
call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction