call CustomVictoryBJ( GetEnumPlayer(), false, false )
endfunction
function GameVictory takes player p returns nothing
call DisplayTextToForce( GetPlayersAll(), GetColoredName(p)+" has won!" )
call PolledWait(5)
call ForForce( GetPlayersAll(), function EndTheGame )
endfunction
//this isn't in code format because I wanted to bold the important parts of it.
Code: Select all
function Trig_Leaver_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), GetColoredName(GetTriggerPlayer())+" has left the game." )
endfunction
//===========================================================================
function InitTrig_Leaver takes nothing returns nothing
set gg_trg_Leaver = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg_Leaver, Player(0) )
...
call TriggerRegisterPlayerEventLeave( gg_trg_Leaver, Player(11) )
call TriggerAddAction( gg_trg_Leaver, function Trig_Leaver_Actions )
endfunction
Code: Select all
function Trig_GameSpeedLock_Actions takes nothing returns nothing
call SetGameSpeed( MAP_SPEED_FASTEST )
call LockGameSpeedBJ( )
endfunction
//===========================================================================
function InitTrig_GameSpeedLock takes nothing returns nothing
set gg_trg_GameSpeedLock = CreateTrigger( )
call TriggerAddAction( gg_trg_GameSpeedLock, function Trig_GameSpeedLock_Actions )
endfunction