Name | Type | is_array | initial_value |
AvailableSpawns | integer | Yes | |
CameraLock | real | Yes | |
Cameras | camerasetup | Yes | |
ComputerAction | boolean | Yes | |
ComputerActionTime | real | Yes | |
ComputerCurrentPlayer | player | No | |
ComputerCurrentUnit | unit | No | |
ComputerNearestDistance | real | No | |
ComputerNearestUnit | unit | No | |
ComputerSkillDistance | real | No | |
ComputerSkillMult | real | Yes | |
ComputerSkillTimeBias | real | No | |
Configurer | player | No | |
CurrentNumber | integer | No | |
CurrentSpawn | integer | No | |
DialogButtonAdvanced | button | No | |
DialogButtonExpert | button | No | |
DialogButtonNightmare | button | No | |
DialogButtonNoob | button | No | |
DialogCompSkill | dialog | No | |
DrifterEffect | effect | No | |
DriftGlow | effect | Yes | |
DriftingUnit | unit | No | |
DriftTime | real | No | |
Entries | rect | Yes | |
Leaderboard | leaderboard | No | |
Messages | string | Yes | |
Occupied | boolean | No | |
PlayerIsPlaying | boolean | Yes | |
PlayerNames | string | Yes | |
PlayerType | unitcode | Yes | |
RedPingChx | boolean | No | false |
Regions | rect | Yes | |
Scores | integer | Yes | |
SpawningPlayer | player | No | |
Spawns | rect | Yes | |
TempBool | boolean | No | |
Timer | timer | No | |
TotalMessages | integer | No | |
TotalPlayerTypes | integer | No | |
TotalSpawns | integer | No | |
Units | unit | Yes | |
UseableSpawnCount | integer | No | |
WinningScore | integer | No |
function Trig_Red_Ping_On_Conditions takes nothing returns boolean
if ( not ( udg_RedPingChx == false ) ) then
return false
endif
return true
endfunction
function Trig_Red_Ping_On_Actions takes nothing returns nothing
set udg_RedPingChx = true
endfunction
//===========================================================================
function InitTrig_Red_Ping_On takes nothing returns nothing
set gg_trg_Red_Ping_On = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Red_Ping_On, Player(0), "-ping", true )
call TriggerAddCondition( gg_trg_Red_Ping_On, Condition( function Trig_Red_Ping_On_Conditions ) )
call TriggerAddAction( gg_trg_Red_Ping_On, function Trig_Red_Ping_On_Actions )
endfunction
function Trig_Red_Ping_Off_Conditions takes nothing returns boolean
if ( not ( udg_RedPingChx == true ) ) then
return false
endif
return true
endfunction
function Trig_Red_Ping_Off_Actions takes nothing returns nothing
set udg_RedPingChx = false
endfunction
//===========================================================================
function InitTrig_Red_Ping_Off takes nothing returns nothing
set gg_trg_Red_Ping_Off = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Red_Ping_Off, Player(0), "-ping", true )
call TriggerAddCondition( gg_trg_Red_Ping_Off, Condition( function Trig_Red_Ping_Off_Conditions ) )
call TriggerAddAction( gg_trg_Red_Ping_Off, function Trig_Red_Ping_Off_Actions )
endfunction
function Trig_Red_Ping_All_Conditions takes nothing returns boolean
if ( not ( udg_RedPingChx == true ) ) then
return false
endif
return true
endfunction
function Trig_Red_Ping_All_Actions takes nothing returns nothing
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(1)))), 3.00 )
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(2)))), 3.00 )
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(3)))), 3.00 )
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(4)))), 3.00 )
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(5)))), 3.00 )
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(6)))), 3.00 )
call PingMinimapLocForForce( bj_FORCE_PLAYER[0], GetUnitLoc(GroupPickRandomUnit(GetUnitsOfPlayerAll(Player(7)))), 3.00 )
endfunction
//===========================================================================
function InitTrig_Red_Ping_All takes nothing returns nothing
set gg_trg_Red_Ping_All = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Red_Ping_All, 2 )
call TriggerAddCondition( gg_trg_Red_Ping_All, Condition( function Trig_Red_Ping_All_Conditions ) )
call TriggerAddAction( gg_trg_Red_Ping_All, function Trig_Red_Ping_All_Actions )
endfunction
function Trig_Player_Loop_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Player_Loop_Func001002 takes nothing returns nothing
call TriggerExecute( gg_trg_____Camera_Lock )
endfunction
function Trig_Player_Loop_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Player_Loop_Func001001001)), function Trig_Player_Loop_Func001002 )
endfunction
//===========================================================================
function InitTrig_Player_Loop takes nothing returns nothing
set gg_trg_Player_Loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Player_Loop, 0.10 )
call TriggerAddAction( gg_trg_Player_Loop, function Trig_Player_Loop_Actions )
endfunction
function Trig_____Camera_Lock_Func002001 takes nothing returns boolean
return ( udg_CameraLock[GetConvertedPlayerId(GetEnumPlayer())] >= 0.00 )
endfunction
function Trig_____Camera_Lock_Actions takes nothing returns nothing
set udg_CameraLock[GetConvertedPlayerId(GetEnumPlayer())] = ( udg_CameraLock[GetConvertedPlayerId(GetEnumPlayer())] - 0.10 )
if ( Trig_____Camera_Lock_Func002001() ) then
return
else
call DoNothing( )
endif
call CameraSetSmoothingFactorBJ( 10.00 )
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_ROTATION, GetUnitFacing(udg_Units[GetConvertedPlayerId(GetEnumPlayer())]), 1.00 )
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_ANGLE_OF_ATTACK, CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK, gg_cam_Camera_Game), 0.00 )
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_TARGET_DISTANCE, CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE, gg_cam_Camera_Game), 0.00 )
call SetCameraFieldForPlayer( GetEnumPlayer(), CAMERA_FIELD_FIELD_OF_VIEW, CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW, gg_cam_Camera_Game), 0.00 )
endfunction
//===========================================================================
function InitTrig_____Camera_Lock takes nothing returns nothing
set gg_trg_____Camera_Lock = CreateTrigger( )
call TriggerAddAction( gg_trg_____Camera_Lock, function Trig_____Camera_Lock_Actions )
endfunction
function Trig_Player_Leaves_Event_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Player_Leaves_Event_Func001002001 takes nothing returns boolean
return ( udg_PlayerIsPlaying[GetConvertedPlayerId(GetEnumPlayer())] == true )
endfunction
function Trig_Player_Leaves_Event_Func001002 takes nothing returns nothing
if ( Trig_Player_Leaves_Event_Func001002001() ) then
call TriggerExecute( gg_trg_____Leaving_Player )
else
call DoNothing( )
endif
endfunction
function Trig_Player_Leaves_Event_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Player_Leaves_Event_Func001001001)), function Trig_Player_Leaves_Event_Func001002 )
endfunction
//===========================================================================
function InitTrig_Player_Leaves_Event takes nothing returns nothing
set gg_trg_Player_Leaves_Event = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Player_Leaves_Event, 1.00 )
call TriggerAddAction( gg_trg_Player_Leaves_Event, function Trig_Player_Leaves_Event_Actions )
endfunction
function Trig_____Leaving_Player_Func003001002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetEnumPlayer() )
endfunction
function Trig_____Leaving_Player_Func003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_____Leaving_Player_Actions takes nothing returns nothing
set udg_PlayerIsPlaying[GetConvertedPlayerId(GetEnumPlayer())] = false
call LeaderboardRemovePlayerItemBJ( GetEnumPlayer(), GetLastCreatedLeaderboard() )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_____Leaving_Player_Func003001002)), function Trig_____Leaving_Player_Func003002 )
call DisplayTextToForce( GetPlayersAll(), ( udg_PlayerNames[GetConvertedPlayerId(GetEnumPlayer())] + ( " has left the Paintball-Rumble Arena with a score of " + ( ( "|c00FFFF00" + I2S(udg_Scores[GetConvertedPlayerId(GetEnumPlayer())]) ) + "|r!" ) ) ) )
endfunction
//===========================================================================
function InitTrig_____Leaving_Player takes nothing returns nothing
set gg_trg_____Leaving_Player = CreateTrigger( )
call TriggerAddAction( gg_trg_____Leaving_Player, function Trig_____Leaving_Player_Actions )
endfunction
function Trig_Unit_Death_Event_Actions takes nothing returns nothing
set udg_Scores[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] = ( udg_Scores[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + 1 )
call LeaderboardSetPlayerItemValueBJ( GetOwningPlayer(GetKillingUnitBJ()), udg_Leaderboard, udg_Scores[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] )
call LeaderboardSortItemsBJ( udg_Leaderboard, bj_SORTTYPE_SORTBYVALUE, false )
call DisplayTimedTextToForce( GetPlayersAll(), 3.00, ( ( udg_PlayerNames[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] + udg_Messages[GetRandomInt(1, udg_TotalMessages)] ) + ( udg_PlayerNames[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + "!" ) ) )
call PingMinimapLocForForce( GetPlayersAll(), GetUnitLoc(GetDyingUnit()), 2.00 )
call TriggerSleepAction( 3.00 )
set udg_SpawningPlayer = GetOwningPlayer(GetDyingUnit())
call ConditionalTriggerExecute( gg_trg_Spawn )
call TriggerSleepAction( 7.00 )
call RemoveUnit( GetDyingUnit() )
endfunction
//===========================================================================
function InitTrig_Unit_Death_Event takes nothing returns nothing
set gg_trg_Unit_Death_Event = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(1), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(2), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(3), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(4), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(5), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(6), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(7), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(8), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(9), EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Unit_Death_Event, Player(10), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Unit_Death_Event, function Trig_Unit_Death_Event_Actions )
endfunction
function Trig_Sub_Main_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Set_Constants )
call TriggerExecute( gg_trg_Misc_Setup )
endfunction
//===========================================================================
function InitTrig_Sub_Main takes nothing returns nothing
set gg_trg_Sub_Main = CreateTrigger( )
call TriggerAddAction( gg_trg_Sub_Main, function Trig_Sub_Main_Actions )
endfunction
function Trig_Resume_Sub_Main_Func005001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Resume_Sub_Main_Func005002 takes nothing returns nothing
call TriggerExecute( gg_trg_____Initial_Spawn )
endfunction
function Trig_Resume_Sub_Main_Actions takes nothing returns nothing
call FogMaskEnableOff( )
call FogEnableOn( )
call EnableWorldFogBoundaryBJ( false, GetPlayersAll() )
call TriggerExecute( gg_trg_Leaderboard )
call ForForce( GetPlayersMatching(Condition(function Trig_Resume_Sub_Main_Func005001001)), function Trig_Resume_Sub_Main_Func005002 )
endfunction
//===========================================================================
function InitTrig_Resume_Sub_Main takes nothing returns nothing
set gg_trg_Resume_Sub_Main = CreateTrigger( )
call TriggerAddAction( gg_trg_Resume_Sub_Main, function Trig_Resume_Sub_Main_Actions )
endfunction
function Trig_____Initial_Spawn_Actions takes nothing returns nothing
set udg_SpawningPlayer = GetEnumPlayer()
call TriggerExecute( gg_trg_Spawn )
endfunction
//===========================================================================
function InitTrig_____Initial_Spawn takes nothing returns nothing
set gg_trg_____Initial_Spawn = CreateTrigger( )
call TriggerAddAction( gg_trg_____Initial_Spawn, function Trig_____Initial_Spawn_Actions )
endfunction
function Trig_Misc_Setup_Func007001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Misc_Setup_Func007002 takes nothing returns nothing
set udg_PlayerIsPlaying[GetConvertedPlayerId(GetEnumPlayer())] = true
endfunction
function Trig_Misc_Setup_Func008002 takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call SetPlayerAllianceBJ( GetEnumPlayer(), ALLIANCE_PASSIVE, true, ConvertedPlayer(GetForLoopIndexA()) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Trig_Misc_Setup_Func011001001 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_USER )
endfunction
function Trig_Misc_Setup_Func011002 takes nothing returns nothing
call TriggerExecute( gg_trg_____Select_Configurer )
endfunction
function Trig_Misc_Setup_Func013001001001 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Misc_Setup_Func013001001002 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Misc_Setup_Func013001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Misc_Setup_Func013001001001(), Trig_Misc_Setup_Func013001001002() )
endfunction
function Trig_Misc_Setup_Func013002 takes nothing returns nothing
set udg_TempBool = true
endfunction
function Trig_Misc_Setup_Func014001 takes nothing returns boolean
return ( udg_TempBool == true )
endfunction
function Trig_Misc_Setup_Actions takes nothing returns nothing
call SetPlayerOnScoreScreenBJ( false, Player(11) )
call SetSkyModel( "Environment\\Sky\\FelwoodSky\\FelwoodSky.mdl" )
call CustomDefeatBJ( Player(11), "TRIGSTR_152" )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_153" )
call ForForce( GetPlayersMatching(Condition(function Trig_Misc_Setup_Func007001001)), function Trig_Misc_Setup_Func007002 )
call ForForce( GetPlayersAll(), function Trig_Misc_Setup_Func008002 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_032" )
set udg_TempBool = false
call ForForce( GetPlayersMatching(Condition(function Trig_Misc_Setup_Func011001001)), function Trig_Misc_Setup_Func011002 )
set udg_TempBool = false
call ForForce( GetPlayersMatching(Condition(function Trig_Misc_Setup_Func013001001)), function Trig_Misc_Setup_Func013002 )
if ( Trig_Misc_Setup_Func014001() ) then
call TriggerExecute( gg_trg_____Do_Dialog )
else
call TriggerExecute( gg_trg_Resume_Sub_Main )
endif
endfunction
//===========================================================================
function InitTrig_Misc_Setup takes nothing returns nothing
set gg_trg_Misc_Setup = CreateTrigger( )
call TriggerAddAction( gg_trg_Misc_Setup, function Trig_Misc_Setup_Actions )
endfunction
function Trig_____Select_Configurer_Func001001 takes nothing returns boolean
return ( udg_TempBool == true )
endfunction
function Trig_____Select_Configurer_Actions takes nothing returns nothing
if ( Trig_____Select_Configurer_Func001001() ) then
return
else
call DoNothing( )
endif
set udg_TempBool = true
set udg_Configurer = GetEnumPlayer()
endfunction
//===========================================================================
function InitTrig_____Select_Configurer takes nothing returns nothing
set gg_trg_____Select_Configurer = CreateTrigger( )
call TriggerAddAction( gg_trg_____Select_Configurer, function Trig_____Select_Configurer_Actions )
endfunction
function Trig_____Do_Dialog_Actions takes nothing returns nothing
call TriggerSleepAction( 0.10 )
call DialogSetMessageBJ( udg_DialogCompSkill, "TRIGSTR_078" )
call DialogAddButtonBJ( udg_DialogCompSkill, "TRIGSTR_079" )
set udg_DialogButtonNoob = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_DialogCompSkill, "TRIGSTR_155" )
set udg_DialogButtonAdvanced = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_DialogCompSkill, "TRIGSTR_080" )
set udg_DialogButtonExpert = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_DialogCompSkill, "TRIGSTR_081" )
set udg_DialogButtonNightmare = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_DialogCompSkill, udg_Configurer )
endfunction
//===========================================================================
function InitTrig_____Do_Dialog takes nothing returns nothing
set gg_trg_____Do_Dialog = CreateTrigger( )
call TriggerAddAction( gg_trg_____Do_Dialog, function Trig_____Do_Dialog_Actions )
endfunction
function Trig_Catch_Dialog_Button_Func001001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonNoob )
endfunction
function Trig_Catch_Dialog_Button_Func002001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonNoob )
endfunction
function Trig_Catch_Dialog_Button_Func003001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonNoob )
endfunction
function Trig_Catch_Dialog_Button_Func004001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonAdvanced )
endfunction
function Trig_Catch_Dialog_Button_Func005001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonAdvanced )
endfunction
function Trig_Catch_Dialog_Button_Func006001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonAdvanced )
endfunction
function Trig_Catch_Dialog_Button_Func007001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonExpert )
endfunction
function Trig_Catch_Dialog_Button_Func008001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonExpert )
endfunction
function Trig_Catch_Dialog_Button_Func009001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonExpert )
endfunction
function Trig_Catch_Dialog_Button_Func010001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonNightmare )
endfunction
function Trig_Catch_Dialog_Button_Func011001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonNightmare )
endfunction
function Trig_Catch_Dialog_Button_Func012001 takes nothing returns boolean
return ( GetClickedButtonBJ() == udg_DialogButtonNightmare )
endfunction
function Trig_Catch_Dialog_Button_Actions takes nothing returns nothing
if ( Trig_Catch_Dialog_Button_Func001001() ) then
set udg_ComputerSkillDistance = 180.00
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func002001() ) then
set udg_ComputerSkillTimeBias = 2.00
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func003001() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_123" )
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func004001() ) then
set udg_ComputerSkillDistance = 300.00
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func005001() ) then
set udg_ComputerSkillTimeBias = 1.00
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func006001() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_162" )
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func007001() ) then
set udg_ComputerSkillDistance = 360.00
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func008001() ) then
set udg_ComputerSkillTimeBias = 0.67
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func009001() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_128" )
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func010001() ) then
set udg_ComputerSkillDistance = 1000000.00
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func011001() ) then
set udg_ComputerSkillTimeBias = 0.01
else
call DoNothing( )
endif
if ( Trig_Catch_Dialog_Button_Func012001() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_133" )
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Resume_Sub_Main )
endfunction
//===========================================================================
function InitTrig_Catch_Dialog_Button takes nothing returns nothing
set gg_trg_Catch_Dialog_Button = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Catch_Dialog_Button, udg_DialogCompSkill )
call TriggerAddAction( gg_trg_Catch_Dialog_Button, function Trig_Catch_Dialog_Button_Actions )
endfunction
function Trig_Set_Constants_Actions takes nothing returns nothing
set udg_PlayerType[1] = 'hC00'
set udg_PlayerType[2] = 'hC05'
set udg_PlayerType[3] = 'hC01'
set udg_PlayerType[4] = 'hC04'
set udg_TotalPlayerTypes = 4
set udg_Cameras[1] = gg_cam_Camera_1
set udg_Spawns[1] = gg_rct_Spawn_1
set udg_Regions[1] = gg_rct_Region_1
set udg_Entries[1] = gg_rct_Entry_1
set udg_Cameras[2] = gg_cam_Camera_2
set udg_Spawns[2] = gg_rct_Spawn_2
set udg_Regions[2] = gg_rct_Region_2
set udg_Entries[2] = gg_rct_Entry_2
set udg_Cameras[3] = gg_cam_Camera_3
set udg_Spawns[3] = gg_rct_Spawn_3
set udg_Regions[3] = gg_rct_Region_3
set udg_Entries[3] = gg_rct_Entry_3
set udg_Cameras[4] = gg_cam_Camera_4
set udg_Spawns[4] = gg_rct_Spawn_4
set udg_Regions[4] = gg_rct_Region_4
set udg_Entries[4] = gg_rct_Entry_4
set udg_Cameras[5] = gg_cam_Camera_5
set udg_Spawns[5] = gg_rct_Spawn_5
set udg_Regions[5] = gg_rct_Region_5
set udg_Entries[5] = gg_rct_Entry_5
set udg_Cameras[6] = gg_cam_Camera_6
set udg_Spawns[6] = gg_rct_Spawn_6
set udg_Regions[6] = gg_rct_Region_6
set udg_Entries[6] = gg_rct_Entry_6
set udg_Cameras[7] = gg_cam_Camera_7
set udg_Spawns[7] = gg_rct_Spawn_7
set udg_Regions[7] = gg_rct_Region_7
set udg_Entries[7] = gg_rct_Entry_7
set udg_Cameras[8] = gg_cam_Camera_8
set udg_Spawns[8] = gg_rct_Spawn_8
set udg_Regions[8] = gg_rct_Region_8
set udg_Entries[8] = gg_rct_Entry_8
set udg_Messages[1] = " was killed by "
set udg_Messages[2] = " was shot by "
set udg_Messages[3] = " was painted by "
set udg_Messages[4] = " got nailed by "
set udg_Messages[5] = " lost his head to "
set udg_Messages[6] = " got his face shot off by "
set udg_Messages[7] = " died at the hands of "
set udg_Messages[8] = " invaded the territory of "
set udg_Messages[9] = " learned a valuable lesson from "
set udg_Messages[10] = " rests in pieces near "
set udg_Messages[11] = " almost dodged the paint from "
set udg_Messages[12] = " ate a paintball from "
set udg_Messages[13] = " got owned by "
set udg_Messages[14] = " was humiliated by "
set udg_Messages[15] = " kicked the bucket near "
set udg_Messages[16] = " fell out of the tree near "
set udg_Messages[17] = " was embarrased by "
set udg_Messages[18] = " was ridiculed by "
set udg_Messages[19] = " got railed by "
set udg_Messages[20] = " got hammered by "
set udg_Messages[21] = " got slaughtered by "
set udg_Messages[22] = " got toasted by "
set udg_Messages[23] = " got blasted by "
set udg_Messages[24] = " got wrecked by "
set udg_Messages[25] = " got roasted by "
set udg_Messages[26] = " was shot out of the tree by "
set udg_Messages[27] = " got mutilated by "
set udg_Messages[28] = " was destroyed by "
set udg_Messages[29] = " is showing his insides to "
set udg_TotalMessages = 29
set udg_PlayerNames[1] = ( "|c00FF0000" + ( GetPlayerName(Player(0)) + "|r" ) )
set udg_PlayerNames[2] = ( "|c000000FF" + ( GetPlayerName(Player(1)) + "|r" ) )
set udg_PlayerNames[3] = ( "|c0000FFBF" + ( GetPlayerName(Player(2)) + "|r" ) )
set udg_PlayerNames[4] = ( "|c003F007F" + ( GetPlayerName(Player(3)) + "|r" ) )
set udg_PlayerNames[5] = ( "|c00FFFF00" + ( GetPlayerName(Player(4)) + "|r" ) )
set udg_PlayerNames[6] = ( "|c00FF7F00" + ( GetPlayerName(Player(5)) + "|r" ) )
set udg_PlayerNames[7] = ( "|c0000FF00" + ( GetPlayerName(Player(6)) + "|r" ) )
set udg_PlayerNames[8] = ( "|c00FF3FFF" + ( GetPlayerName(Player(7)) + "|r" ) )
set udg_TotalSpawns = 8
set udg_RedPingChx = false
endfunction
//===========================================================================
function InitTrig_Set_Constants takes nothing returns nothing
set gg_trg_Set_Constants = CreateTrigger( )
call TriggerAddAction( gg_trg_Set_Constants, function Trig_Set_Constants_Actions )
endfunction
function Trig_Leaderboard_Func004001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Leaderboard_Func004002 takes nothing returns nothing
call LeaderboardAddItemBJ( GetEnumPlayer(), udg_Leaderboard, GetPlayerName(GetEnumPlayer()), 0 )
endfunction
function Trig_Leaderboard_Actions takes nothing returns nothing
call TriggerSleepAction( 0.10 )
call CreateLeaderboardBJ( GetPlayersAll(), "TRIGSTR_027" )
set udg_Leaderboard = GetLastCreatedLeaderboard()
call ForForce( GetPlayersMatching(Condition(function Trig_Leaderboard_Func004001001)), function Trig_Leaderboard_Func004002 )
call LeaderboardDisplayBJ( true, udg_Leaderboard )
call CreateTimerDialogBJ( udg_Timer, "TRIGSTR_048" )
call StartTimerBJ( udg_Timer, false, 600.00 )
endfunction
//===========================================================================
function InitTrig_Leaderboard takes nothing returns nothing
set gg_trg_Leaderboard = CreateTrigger( )
call TriggerAddAction( gg_trg_Leaderboard, function Trig_Leaderboard_Actions )
endfunction
function Trig_Doors_Actions takes nothing returns nothing
call SetDestructableInvulnerableBJ( gg_dest_ATg1_0284, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg4_0287, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg3_0238, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg2_0288, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg1_0285, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg4_0286, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg3_0161, true )
call SetDestructableInvulnerableBJ( gg_dest_ATg2_0289, true )
endfunction
//===========================================================================
function InitTrig_Doors takes nothing returns nothing
set gg_trg_Doors = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Doors, 5 )
call TriggerAddAction( gg_trg_Doors, function Trig_Doors_Actions )
endfunction
function Trig_Spawn_Func001001 takes nothing returns boolean
return ( GetPlayerSlotState(udg_SpawningPlayer) != PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Spawn_Func003001 takes nothing returns boolean
return ( udg_CurrentSpawn == 0 )
endfunction
function Trig_Spawn_Actions takes nothing returns nothing
if ( Trig_Spawn_Func001001() ) then
return
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_Request_Spawn )
if ( Trig_Spawn_Func003001() ) then
return
else
call DoNothing( )
endif
call CreateNUnitsAtLoc( 1, udg_PlayerType[GetRandomInt(1, udg_TotalPlayerTypes)], udg_SpawningPlayer, GetRectCenter(udg_Spawns[udg_CurrentSpawn]), 0.00 )
call ConditionalTriggerExecute( gg_trg_____Camera_Fly_In )
endfunction
//===========================================================================
function InitTrig_Spawn takes nothing returns nothing
set gg_trg_Spawn = CreateTrigger( )
call TriggerAddAction( gg_trg_Spawn, function Trig_Spawn_Actions )
endfunction
function Trig_____Camera_Fly_In_Func003001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_____Camera_Fly_In_Func003002 takes nothing returns nothing
call TriggerExecute( gg_trg_________Unit_Orders )
endfunction
function Trig_____Camera_Fly_In_Actions takes nothing returns nothing
set udg_CameraLock[GetConvertedPlayerId(udg_SpawningPlayer)] = 1.80
call CameraSetupApplyForPlayer( true, udg_Cameras[udg_CurrentSpawn], udg_SpawningPlayer, 0 )
call ForGroupBJ( GetUnitsInRectMatching(udg_Regions[udg_CurrentSpawn], Condition(function Trig_____Camera_Fly_In_Func003001002)), function Trig_____Camera_Fly_In_Func003002 )
call ResetToGameCameraForPlayer( udg_SpawningPlayer, 1.80 )
call SetCameraFieldForPlayer( udg_SpawningPlayer, CAMERA_FIELD_ROTATION, GetUnitFacing(udg_Units[GetConvertedPlayerId(udg_SpawningPlayer)]), 1.80 )
call SetCameraFieldForPlayer( udg_SpawningPlayer, CAMERA_FIELD_ANGLE_OF_ATTACK, CameraSetupGetFieldSwap(CAMERA_FIELD_ANGLE_OF_ATTACK, gg_cam_Camera_Game), 1.80 )
call SetCameraFieldForPlayer( udg_SpawningPlayer, CAMERA_FIELD_TARGET_DISTANCE, CameraSetupGetFieldSwap(CAMERA_FIELD_TARGET_DISTANCE, gg_cam_Camera_Game), 1.80 )
call SetCameraFieldForPlayer( udg_SpawningPlayer, CAMERA_FIELD_FIELD_OF_VIEW, CameraSetupGetFieldSwap(CAMERA_FIELD_FIELD_OF_VIEW, gg_cam_Camera_Game), 1.80 )
call SetCameraTargetControllerNoZForPlayer( udg_SpawningPlayer, udg_Units[GetConvertedPlayerId(udg_SpawningPlayer)], 0, 0, false )
endfunction
//===========================================================================
function InitTrig_____Camera_Fly_In takes nothing returns nothing
set gg_trg_____Camera_Fly_In = CreateTrigger( )
call TriggerAddAction( gg_trg_____Camera_Fly_In, function Trig_____Camera_Fly_In_Actions )
endfunction
function Trig_________Unit_Orders_Actions takes nothing returns nothing
call SetUnitFacingToFaceLocTimed( GetEnumUnit(), GetRectCenter(udg_Entries[udg_CurrentSpawn]), 0.00 )
call IssuePointOrderLocBJ( GetEnumUnit(), "move", GetRectCenter(udg_Entries[udg_CurrentSpawn]) )
set udg_Units[GetConvertedPlayerId(udg_SpawningPlayer)] = GetEnumUnit()
endfunction
//===========================================================================
function InitTrig_________Unit_Orders takes nothing returns nothing
set gg_trg_________Unit_Orders = CreateTrigger( )
call TriggerAddAction( gg_trg_________Unit_Orders, function Trig_________Unit_Orders_Actions )
endfunction
function Trig_Request_Spawn_Func003001 takes nothing returns boolean
return ( udg_UseableSpawnCount > 0 )
endfunction
function Trig_Request_Spawn_Func004001 takes nothing returns boolean
return ( udg_CurrentSpawn > 0 )
endfunction
function Trig_Request_Spawn_Actions takes nothing returns nothing
set udg_UseableSpawnCount = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_TotalSpawns
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerExecute( gg_trg_____Region_Test )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Request_Spawn_Func003001() ) then
set udg_CurrentSpawn = udg_AvailableSpawns[GetRandomInt(1, udg_UseableSpawnCount)]
else
set udg_CurrentSpawn = 0
endif
if ( Trig_Request_Spawn_Func004001() ) then
return
else
call DoNothing( )
endif
call CreateNUnitsAtLoc( 1, 'hC00', udg_SpawningPlayer, GetRectCenter(GetPlayableMapRect()), 0.00 )
call SetCameraTargetControllerNoZForPlayer( udg_SpawningPlayer, GetLastCreatedUnit(), 0, 0, false )
call DisplayTextToForce( GetPlayersAll(), ( " (Internal Error; No free spawn locations for " + ( udg_PlayerNames[GetConvertedPlayerId(udg_SpawningPlayer)] + " !)" ) ) )
endfunction
//===========================================================================
function InitTrig_Request_Spawn takes nothing returns nothing
set gg_trg_Request_Spawn = CreateTrigger( )
call TriggerAddAction( gg_trg_Request_Spawn, function Trig_Request_Spawn_Actions )
endfunction
function Trig_____Region_Test_Func002001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_____Region_Test_Func002002 takes nothing returns nothing
set udg_Occupied = true
endfunction
function Trig_____Region_Test_Func003001 takes nothing returns boolean
return ( udg_Occupied == false )
endfunction
function Trig_____Region_Test_Actions takes nothing returns nothing
set udg_Occupied = false
call ForGroupBJ( GetUnitsInRectMatching(udg_Regions[GetForLoopIndexA()], Condition(function Trig_____Region_Test_Func002001002)), function Trig_____Region_Test_Func002002 )
if ( Trig_____Region_Test_Func003001() ) then
call ConditionalTriggerExecute( gg_trg_________UnOccupied )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_____Region_Test takes nothing returns nothing
set gg_trg_____Region_Test = CreateTrigger( )
call TriggerAddAction( gg_trg_____Region_Test, function Trig_____Region_Test_Actions )
endfunction
function Trig_________UnOccupied_Actions takes nothing returns nothing
set udg_UseableSpawnCount = ( udg_UseableSpawnCount + 1 )
set udg_AvailableSpawns[udg_UseableSpawnCount] = GetForLoopIndexA()
endfunction
//===========================================================================
function InitTrig_________UnOccupied takes nothing returns nothing
set gg_trg_________UnOccupied = CreateTrigger( )
call TriggerAddAction( gg_trg_________UnOccupied, function Trig_________UnOccupied_Actions )
endfunction
function Trig_Run_Computer_Loop_Func001001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_Run_Computer_Loop_Func001001001002 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Run_Computer_Loop_Func001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_Run_Computer_Loop_Func001001001001(), Trig_Run_Computer_Loop_Func001001001002() )
endfunction
function Trig_Run_Computer_Loop_Func001002 takes nothing returns nothing
call TriggerExecute( gg_trg_____For_Each_Computer )
endfunction
function Trig_Run_Computer_Loop_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Run_Computer_Loop_Func001001001)), function Trig_Run_Computer_Loop_Func001002 )
endfunction
//===========================================================================
function InitTrig_Run_Computer_Loop takes nothing returns nothing
set gg_trg_Run_Computer_Loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Run_Computer_Loop, 0.25 )
call TriggerAddAction( gg_trg_Run_Computer_Loop, function Trig_Run_Computer_Loop_Actions )
endfunction
function Trig_____For_Each_Computer_Func006001 takes nothing returns boolean
return ( udg_ComputerActionTime[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] <= 0.00 )
endfunction
function Trig_____For_Each_Computer_Func007001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == udg_ComputerCurrentPlayer )
endfunction
function Trig_____For_Each_Computer_Func007001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_____For_Each_Computer_Func007001002 takes nothing returns boolean
return GetBooleanAnd( Trig_____For_Each_Computer_Func007001002001(), Trig_____For_Each_Computer_Func007001002002() )
endfunction
function Trig_____For_Each_Computer_Func007002 takes nothing returns nothing
set udg_ComputerCurrentUnit = GetEnumUnit()
endfunction
function Trig_____For_Each_Computer_Func008001 takes nothing returns boolean
return ( udg_ComputerCurrentUnit == null )
endfunction
function Trig_____For_Each_Computer_Func009001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_____For_Each_Computer_Func009001002002 takes nothing returns boolean
return ( GetFilterUnit() != udg_ComputerCurrentUnit )
endfunction
function Trig_____For_Each_Computer_Func009001002 takes nothing returns boolean
return GetBooleanAnd( Trig_____For_Each_Computer_Func009001002001(), Trig_____For_Each_Computer_Func009001002002() )
endfunction
function Trig_____For_Each_Computer_Func009002001 takes nothing returns boolean
return ( DistanceBetweenPoints(GetUnitLoc(GetEnumUnit()), GetUnitLoc(udg_ComputerCurrentUnit)) < udg_ComputerNearestDistance )
endfunction
function Trig_____For_Each_Computer_Func009002 takes nothing returns nothing
if ( Trig_____For_Each_Computer_Func009002001() ) then
call TriggerExecute( gg_trg_________Replace_Nearest_Unit )
else
call DoNothing( )
endif
endfunction
function Trig_____For_Each_Computer_Func010001001 takes nothing returns boolean
return ( udg_ComputerNearestDistance >= 600.00 )
endfunction
function Trig_____For_Each_Computer_Func010001002 takes nothing returns boolean
return ( udg_ComputerAction[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] == true )
endfunction
function Trig_____For_Each_Computer_Func010001 takes nothing returns boolean
return GetBooleanAnd( Trig_____For_Each_Computer_Func010001001(), Trig_____For_Each_Computer_Func010001002() )
endfunction
function Trig_____For_Each_Computer_Func010003001 takes nothing returns boolean
return ( udg_ComputerNearestDistance < ( udg_ComputerSkillDistance * udg_ComputerSkillMult[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] ) )
endfunction
function Trig_____For_Each_Computer_Actions takes nothing returns nothing
set udg_ComputerNearestDistance = 100000.00
set udg_ComputerCurrentUnit = null
set udg_ComputerNearestUnit = null
set udg_ComputerCurrentPlayer = GetEnumPlayer()
set udg_ComputerActionTime[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] = ( udg_ComputerActionTime[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] - 0.25 )
if ( Trig_____For_Each_Computer_Func006001() ) then
call TriggerExecute( gg_trg_________Flip_Action )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_____For_Each_Computer_Func007001002)), function Trig_____For_Each_Computer_Func007002 )
if ( Trig_____For_Each_Computer_Func008001() ) then
return
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_____For_Each_Computer_Func009001002)), function Trig_____For_Each_Computer_Func009002 )
if ( Trig_____For_Each_Computer_Func010001() ) then
call IssueImmediateOrderBJ( udg_ComputerCurrentUnit, "stop" )
else
if ( Trig_____For_Each_Computer_Func010003001() ) then
call IssueTargetOrderBJ( udg_ComputerCurrentUnit, "attack", udg_ComputerNearestUnit )
else
call IssuePointOrderLocBJ( udg_ComputerCurrentUnit, "move", GetUnitLoc(udg_ComputerNearestUnit) )
endif
endif
endfunction
//===========================================================================
function InitTrig_____For_Each_Computer takes nothing returns nothing
set gg_trg_____For_Each_Computer = CreateTrigger( )
call TriggerAddAction( gg_trg_____For_Each_Computer, function Trig_____For_Each_Computer_Actions )
endfunction
function Trig_________Flip_Action_Func001001 takes nothing returns boolean
return ( udg_ComputerAction[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] == true )
endfunction
function Trig_________Flip_Action_Func002001 takes nothing returns boolean
return ( udg_ComputerAction[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] == true )
endfunction
function Trig_________Flip_Action_Actions takes nothing returns nothing
if ( Trig_________Flip_Action_Func001001() ) then
set udg_ComputerAction[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] = false
else
set udg_ComputerAction[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] = true
endif
if ( Trig_________Flip_Action_Func002001() ) then
set udg_ComputerActionTime[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] = ( ( 6.00 * GetRandomReal(0.75, 1.25) ) * udg_ComputerSkillTimeBias )
else
set udg_ComputerActionTime[GetConvertedPlayerId(udg_ComputerCurrentPlayer)] = ( ( 6.00 * GetRandomReal(0.75, 1.25) ) * ( 1.00 / udg_ComputerSkillTimeBias ) )
endif
endfunction
//===========================================================================
function InitTrig_________Flip_Action takes nothing returns nothing
set gg_trg_________Flip_Action = CreateTrigger( )
call TriggerAddAction( gg_trg_________Flip_Action, function Trig_________Flip_Action_Actions )
endfunction
function Trig_________Replace_Nearest_Unit_Actions takes nothing returns nothing
set udg_ComputerNearestUnit = GetEnumUnit()
set udg_ComputerNearestDistance = DistanceBetweenPoints(GetUnitLoc(udg_ComputerCurrentUnit), GetUnitLoc(GetEnumUnit()))
endfunction
//===========================================================================
function InitTrig_________Replace_Nearest_Unit takes nothing returns nothing
set gg_trg_________Replace_Nearest_Unit = CreateTrigger( )
call TriggerAddAction( gg_trg_________Replace_Nearest_Unit, function Trig_________Replace_Nearest_Unit_Actions )
endfunction
function Trig_Rotate_Skill_Mults_Func002001001 takes nothing returns boolean
return ( GetPlayerController(GetFilterPlayer()) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Rotate_Skill_Mults_Func002002 takes nothing returns nothing
set udg_ComputerSkillMult[GetConvertedPlayerId(GetEnumPlayer())] = GetRandomReal(0.90, 1.10)
endfunction
function Trig_Rotate_Skill_Mults_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_Rotate_Skill_Mults_Func002001001)), function Trig_Rotate_Skill_Mults_Func002002 )
endfunction
//===========================================================================
function InitTrig_Rotate_Skill_Mults takes nothing returns nothing
set gg_trg_Rotate_Skill_Mults = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Rotate_Skill_Mults, 0.00 )
call TriggerRegisterTimerEventPeriodic( gg_trg_Rotate_Skill_Mults, 15.00 )
call TriggerAddAction( gg_trg_Rotate_Skill_Mults, function Trig_Rotate_Skill_Mults_Actions )
endfunction
function Trig_End_Game_Func001001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_End_Game_Func001002001 takes nothing returns boolean
return ( udg_Scores[GetConvertedPlayerId(GetEnumPlayer())] > udg_WinningScore )
endfunction
function Trig_End_Game_Func001002 takes nothing returns nothing
if ( Trig_End_Game_Func001002001() ) then
set udg_WinningScore = udg_Scores[GetConvertedPlayerId(GetEnumPlayer())]
else
call DoNothing( )
endif
endfunction
function Trig_End_Game_Func002001001 takes nothing returns boolean
return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_End_Game_Func002002001 takes nothing returns boolean
return ( udg_Scores[GetConvertedPlayerId(GetEnumPlayer())] >= udg_WinningScore )
endfunction
function Trig_End_Game_Func002002 takes nothing returns nothing
if ( Trig_End_Game_Func002002001() ) then
call CustomVictoryBJ( GetEnumPlayer(), true, false )
else
call CustomDefeatBJ( GetEnumPlayer(), "TRIGSTR_060" )
endif
endfunction
function Trig_End_Game_Actions takes nothing returns nothing
call ForForce( GetPlayersMatching(Condition(function Trig_End_Game_Func001001001)), function Trig_End_Game_Func001002 )
call ForForce( GetPlayersMatching(Condition(function Trig_End_Game_Func002001001)), function Trig_End_Game_Func002002 )
call DisableTrigger( gg_trg_Player_Leaves_Event )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_173" )
endfunction
//===========================================================================
function InitTrig_End_Game takes nothing returns nothing
set gg_trg_End_Game = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_End_Game, udg_Timer )
call TriggerAddAction( gg_trg_End_Game, function Trig_End_Game_Actions )
endfunction