--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
-- Empire Attacking (attacker is always #1)
REP = 1;
IMP = 2;
-- These variables do not change
ATT = 1;
DEF = 2;
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
UnblockPlanningGraphArcs("Connection74")
DisableBarriers("1")
--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"}
cp6 = CommandPost:New{name = "cp6"}
--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:AddCommandPost(cp6)
conquest:Start()
SetUberMode(1);
PlayAnimRise()
DisableBarriers("BALCONEY")
DisableBarriers("bALCONEY2")
DisableBarriers("hallway_f")
DisableBarriers("hackdoor")
DisableBarriers("outside")
OnObjectRespawnName(PlayAnimRise, "DingDong");
OnObjectKillName(PlayAnimDrop, "DingDong");
EnableSPHeroRules()
end
--START BRIDGEWORK!
-- OPEN
function PlayAnimDrop()
PauseAnimation("lava_bridge_raise");
RewindAnimation("lava_bridge_drop");
PlayAnimation("lava_bridge_drop");
-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection82");
BlockPlanningGraphArcs("Connection83");
EnableBarriers("Bridge");
end
-- CLOSE
function PlayAnimRise()
PauseAnimation("lava_bridge_drop");
RewindAnimation("lava_bridge_raise");
PlayAnimation("lava_bridge_raise");
-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection82");
UnblockPlanningGraphArcs("Connection83");
DisableBarriers("Bridge");
end
function ScriptInit()
StealArtistHeap(64*1024)
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(3600000)
ReadDataFile("dc:ingame.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("sound\\mus.lvl;mus1gcw")
--SetMaxFlyHeight(43)
--SetMaxPlayerFlyHeight (43)
EnableAIAutoBalance()
SetTeamAggressiveness(IMP, 0.75)
SetTeamAggressiveness(REP, 0.75)
SetAIDifficulty(9, 9)
ReadDataFile("SIDE\\all.lvl")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper")
ReadDataFile("dc:SIDE\\rep.lvl",
"all_hero_luke_jedi")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper")
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_hero_emperor")
-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 3) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
-- AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize("EntityCloth", 34)
SetMemoryPoolSize("EntitySoundStatic", 133)
SetMemoryPoolSize("Obstacle", 500)
SetMemoryPoolSize("Weapon", 260)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize ("SoldierAnimation", 800)
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 2000)
SetMemoryPoolSize ("ParticleTransformer::SizeTransf", 2000)
SetupTeams{
rep={
team = REP,
units = 28,
reinforcements = 350,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},
},
imp={
team = IMP,
units = 28,
reinforcements = 350,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_rocketeer",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = {"imp_inf_dark_trooper",1, 4},
}
}
SetHeroClass(REP, "all_hero_luke_jedi")
SetHeroClass(IMP, "imp_hero_emperor")
SetSpawnDelay(10.0, 0.25)
-- AddDeathRegion("deathregion")
ReadDataFile("dc:MFU\\mus1.lvl", "mus1_conquest")
SetDenseEnvironment("false")
SetMaxFlyHeight(84.16)
SetMaxPlayerFlyHeight(84.16)
--SetStayInTurrets(1)
AISnipeSuitabilityDist(30)
-- Movies
-- SetVictoryMovie(ALL, "all_end_victory")
-- SetDefeatMovie(ALL, "imp_end_victory")
-- SetVictoryMovie(IMP, "imp_end_victory")
-- SetDefeatMovie(IMP, "all_end_victory")
-- Sound
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)
OpenAudioStream("dc:sound\\tfu.lvl", "tfugcw_music")
OpenAudioStream("sound\\global.lvl", "gcw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\mus.lvl", "mus1")
OpenAudioStream("sound\\mus.lvl", "mus1")
-- OpenAudioStream("sound\\mus.lvl", "mus1_emt")
SetBleedingVoiceOver(REP, REP, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, REP, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
SetLowReinforcementsVoiceOver(REP, REP, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, REP, "imp_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(1, "allleaving")
SetOutOfBoundsVoiceOver(2, "impleaving")
SetAmbientMusic(REP, 1.0, "cis_kam_amb_start", 0,1)
SetAmbientMusic(IMP, 1.0, "cis_kam_amb_start", 0,1)
SetVictoryMusic(REP, "rep_kam_amb_victory")
SetDefeatMusic (REP, "rep_kam_amb_victory")
SetVictoryMusic(IMP, "cis_kam_amb_victory")
SetDefeatMusic (IMP, "cis_kam_amb_victory")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
SetAttackingTeam(ATT)
AddCameraShot(0.446393, -0.064402, -0.883371, -0.127445, -93.406929, 72.953865, -35.479401);
AddCameraShot(-0.297655, 0.057972, -0.935337, -0.182169, -2.384067, 71.165306, 18.453350);
AddCameraShot(0.972488, -0.098362, 0.210097, 0.021250, -42.577881, 69.453072, 4.454691);
AddCameraShot(0.951592, -0.190766, -0.236300, -0.047371, -44.607018, 77.906273, 113.228661);
AddCameraShot(0.841151, -0.105984, 0.526154, 0.066295, 109.567764, 77.906273, 7.873035);
AddCameraShot(0.818472, -0.025863, 0.573678, 0.018127, 125.781593, 61.423031, 9.809184);
AddCameraShot(-0.104764, 0.000163, -0.994496, -0.001550, -13.319855, 70.673264, 63.436607);
AddCameraShot(0.971739, 0.102058, 0.211692, -0.022233, -5.680069, 68.543945, 57.904160);
AddCameraShot(0.178437, 0.004624, -0.983610, 0.025488, -66.947433, 68.543945, 6.745875);
AddCameraShot(-0.400665, 0.076364, -0896894, -0.170941, 96.201210, 79.913033, -58.604382)
end