[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_SetGameRules("campaign")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
Arc = 3;
Dro = 4;
SBD = 5;
function ScriptPostLoad()
SetAIDifficulty(0, 2, "hard")
AllowAISpawn(ATT, false)
AllowAISpawn(DEF, false)
AllowAISpawn(3, false)
AllowAISpawn(4, false)
EnableSPScriptedHeroes()
ScriptCB_SetGameRules("campaign")
onfirstspawn = OnCharacterSpawn(
function(character)
if character == 0 then
ShowPopup("level.geo1.hints.hints")
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
BeginObjectivesTimer()
ScriptCB_EnableCommandPostVO(0)
end
end)
--objective Protect your allies CP
Objective1CP = CommandPost:New{name = "ADDCP_HERE"}
Objective1 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.ETR.campaign.rep.1", popupText = "level.ETR.campaign.rep.1_popup", AIGoalWeight = 0}
Objective1:AddCommandPost(Objective1CP)
Objective1:AddHint("level.geo1.hints.capture_cp")
Objective1.OnStart = function(self)
Matchtimer= CreateTimer("Matchtimer")
SetTimerValue(Matchtimer, (420))
StarTimer(Matchtimer)
OnTimerElapse(AICanCaptureCP("DRO_CP", "SBD_CP", "CIS_CP"), AddAIGoal(ATT, "Defend", 50000, "DRO_CP", SBD_CP", CIS_CP"), AddAIGoal(3, "Defend", 50000, "DRO_CP", "SBD_CP", "CIS_CP"),
DeleteAIGoal(ATT, "Defend", 50000, "ADDCP_HERE")
DeleteAIGoal(DEF, "Defend", 50000, "cp2_c")
DeleteAIGoal(ATT, "Deathmatch", 10)
function(timer)
DestroyTimer(timer)
end,
Matchtimer
)
AICanCaptureCP("ADDCP_HERE", ATT, false)
MapAddEntityMarker("ADDCP_HERE", "hud_objective_icon_circle", 3.0, ATT, "YELLOW", true, true, true)
AICanCaptureCP("ADDCP_HERE", DEF, true)
att_obj1_aigoal = AddAIGoal(ATT, "Defend", 50000, "ADDCP_HERE")
def_obj1_aigoal = AddAIGoal(DEF, "Defend", 50000, "ADDCP_HERE")
def_obj1_aigoal = AddAIGoal(3, "Defend", 50000, "ADDCP_HERE")
def_obj1_aigoal = AddAIGoal(4, "Defend", 50000, "ADDCP_HERE")
def_obj1_aigoal = AddAIGoal(5, "Defend", 50000, "ADDCP_HERE")
att_obj1_aigoal2 = AddAIGoal(ATT, "Deathmatch", 10)
AllowAISpawn(ATT, true)
AllowAISpawn(DEF, true) [/code]