-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:Start()
EnableSPHeroRules()
follow = CharacterIssueAICommand(
function(player, followchr)
KillObject("DeservesToBeKilled")
StartTimer(DeservesTobBeStarted)
end
end,
"followme!")
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(1000)
SetMaxPlayerFlyHeight (1000)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
SetMemoryPoolSize ("LightFlash",118)
SetMemoryPoolSize ("WalkerBlendUnit",60)
ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_pilot",
"rep_inf_ep2_sergeant",
"rep_inf_ep2_lieutanant",
"rep_inf_ep2_captain",
"rep_hero_obiwan",
"rep_inf_ep2_commander",
"rep_fly_gunship",
"rep_walk_atte",
"rep_inf_clone_commando_Boss",
"rep_fly_jedifighter")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_officer",
"cis_inf_droid",
"cis_inf_commander",
"cis_inf_droideka",
"cis_fly_geofighter",
"cis_walk_spider",
"cis_hero_jangofett")
ReadDataFile("dc:SIDE\\geo_heroes.lvl",
"rep_hero_aalya",
"rep_hero_kitfisto",
"rep_hero_kiyadimundi",
"rep_hero_luminara",
"rep_hero_macewindu",
"rep_hero_masterkoon",
"rep_hero_shaakti")
SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep2_rifleman",9, 25},
assault = { "rep_inf_ep2_sergeant",1, 4},
engineer = { "rep_inf_ep2_lieutanant",1, 4},
sniper = { "rep_inf_ep2_captain",1, 4},
officer = {"rep_inf_ep2_commander",1, 4},
pilot = { "rep_inf_ep2_pilot",1, 4},
special = { "rep_inf_clone_commando_Boss",0, 1},
},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_droid",9, 25},
assault = { "cis_inf_officer",1, 4},
officer = {"cis_inf_commander",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
SetTeamName (3, "jedi")
AddUnitClass (3, "rep_hero_aalya", 1,1)
AddUnitClass (3, "rep_hero_kitfisto", 1,1)
AddUnitClass (3, "rep_hero_kiyadimundi", 1,1)
AddUnitClass (3, "rep_hero_luminara", 1,1)
AddUnitClass (3, "rep_hero_macewindu", 1,1)
AddUnitClass (3, "rep_hero_masterkoon", 1,1)
AddUnitClass (3, "rep_hero_shaakti", 1,1)
SetUnitCount (3, 7)
AddAIGoal(3, "Deathmatch", 100)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(3,ATT)
SetHeroClass(CIS, "cis_hero_jangofett")
SetHeroClass(REP, "rep_hero_obiwan")