Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")
---------------------------------------------------------------------------
-- 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")
PlayAnimRise()
DisableBarriers("BALCONEY")
DisableBarriers("bALCONEY2")
DisableBarriers("hallway_f")
DisableBarriers("hackdoor")
DisableBarriers("outside")
OnObjectRespawnName(PlayAnimRise, "DingDong");
OnObjectKillName(PlayAnimDrop, "DingDong");
KillObject("cp1") -- uses FFA spawn paths
KillObject("cp2")
KillObject("cp3")
KillObject("cp4")
KillObject("cp5")
KillObject("cp6")
DisableAIAutoBalance() -- makes bots harder
SetAIDifficulty(10,10,"medium")
SetAIDifficulty(10,10,"hard")
players = {} -- list of characters
scores = {} -- list of scores
unitcount = 0 -- number of players
scorelimit = 50
Player_Stats_Points = { -- controlling how points are earned
{ point_gain = 0 }, --// PS_GLB_KILL_AI_PLAYER = 0,
{ point_gain = 0 }, --// PS_GLB_KILL_HUMAN_PLAYER,
{ point_gain = 0 }, --// PS_GLB_KILL_HUMAN_PLAYER_AI_OFF,
{ point_gain = 0 }, --// PS_GLB_KILL_SUICIDE,
{ point_gain = 0 }, --// PS_GLB_KILL_TEAMMATE,
--//
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_INFANTRY_VS_VEHICLE,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_LIGHT_VS_HEAVY,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_LIGHT_VS_MEDIUM,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_HEAVY_VS_LIGHT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_HEAVY_VS_MEDIUM,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_MEDIUM_VS_LIGHT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_MEDIUM_VS_HEAVY,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_ATAT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_EMPTY,
--//
{ point_gain = 0 }, --// PS_GLB_HEAL,
{ point_gain = 0 }, --// PS_GLB_REPAIR,
--//
{ point_gain = 0 }, --// PS_GLB_SNIPER_ACCURACY,
{ point_gain = 0 }, --// PS_GLB_HEAVY_WEAPON_MULTI_KILL,
{ point_gain = 0 }, --// PS_GLB_RAMPAGE,
{ point_gain = 0 }, --// PS_GLB_HEAD_SHOT,
{ point_gain = 0 }, --// PS_GLB_KILL_HERO,
--//
--// // conquest
{ point_gain = 0 }, --// PS_CON_CAPTURE_CP,
{ point_gain = 0 }, --// PS_CON_ASSIST_CAPTURE_CP,
{ point_gain = 0 }, --// PS_CON_KILL_ENEMY_CAPTURING_CP,
{ point_gain = 0 }, --// PS_CON_DEFEND_CP,
{ point_gain = 0 }, --// PS_CON_KING_HILL,
--//
--// // capture the flag
{ point_gain = 0 }, --// PS_CAP_PICKUP_FLAG,
{ point_gain = 0 }, --// PS_CAP_DEFEND_FLAG,
{ point_gain = 0 }, --// PS_CAP_CAPTURE_FLAG,
{ point_gain = 0 }, --// PS_CAP_DEFEND_FLAG_CARRIER,
{ point_gain = 0 }, --// PS_CAP_KILL_ENEMY_FLAG_CARRIER,
{ point_gain = 0 }, --// PS_CAP_KILL_ALLY_FLAG_CARRIER,
--//
--// // assault
{ point_gain = 1 }, --// PS_Diet Dr. Pepper_DESTROY_ASSAULT_OBJ,
--//
--// // escort
{ point_gain = 0 }, --// PS_ESC_DEFEND,
--//
--// // defend
{ point_gain = 0 },} --// PS_DEF_DEFEND,
ScriptCB_SetPlayerStatsPoints( Player_Stats_Points )
Player_Stats_Points = nil
spawn = OnCharacterSpawn(function(character) -- register and set up players
local player = character
local new = true
local index = unitcount
local i = 1
for i = 1,index do
if players == player then -- this character is already registered with index i
new = false
end
end
if new then -- this character has not been registered yet
unitcount = unitcount + 1
index = unitcount
players[index] = player
scores[index] = 0
end
SetObjectTeam(GetCharacterUnit(player),3)
end)
kill = OnCharacterDeath(function(character,killer)
if killer and (not (character == killer)) then
local player = killer
local index = unitcount
local i = 1
for i = 1,index do
if players == player then
AddAssaultDestroyPoints(player)
scores = scores + 1
if scores == scorelimit then
MissionVictory(GetCharacterTeam(player))
end
end
end
end
local max1 = 0 -- recomputing max score
local max2 = 0 -- recomputing second highest score
for j=1,unitcount do
if scores[j] > max1 then
max2 = max1
max1 = scores[j]
else
if scores[j] > max2 then
max2 = scores[j]
end
end
end
SetTeamPoints(2,max1) -- Team 2 has highest score
SetTeamPoints(1,max2) -- Team 1 has second highest score
end)
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, multiplayerScoreLimit = 100, pointsPerKillATT = 0, pointsPerKillDEF = 0, textATT = "game.modes.dm1", textDEF = "game.modes.dm2", multiplayerRules = true, isCelebrityDeathmatch = false, isUberMode = true, uberScoreLimit = scorelimit}
TDM:Start()
ClearAIGoals(1)
ClearAIGoals(2)
ClearAIGoals(3)
AddAIGoal(1,"Deathmatch",1000)
AddAIGoal(2,"Deathmatch",1000)
AddAIGoal(3,"Deathmatch",1000)
if (ScriptCB_GetCONMaxTimeLimit() > 0) then
endtimer= CreateTimer("endtimer")
SetTimerValue(endtimer, ScriptCB_GetCONMaxTimeLimit())
ShowTimer(endtimer)
StartTimer(endtimer)
OnTimerElapse(function(timer)
MissionDefeat({1,2})
DestroyTimer(timer)
end,
endtimer)
end
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()
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(3600000)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo
ReadDataFile("ingame.lvl")
-- Republic Attacking (attacker is always #1)
local LEG = 1
local END = 2
-- These variables do not change
local ATT = 1
local DEF = 2
SetTeamAggressiveness(LEG, 0.95)
SetTeamAggressiveness(END, 0.95)
SetTeamName(1, "Legends 1")
SetTeamName(2, "Legends 2")
AISnipeSuitabilityDist(30)
ReadDataFile("sound\\mus.lvl;mus1cw")
ReadDataFile("dc:SIDE\\leg.lvl",
"leg_inf_vader",
"leg_inf_sidious",
"leg_inf_krayt",
"leg_inf_nihilus",
"leg_inf_malak",
"leg_inf_sion",
"leg_inf_kyloren",
"leg_inf_revan",
"leg_inf_starkiller",
"leg_inf_bane",
"leg_inf_maul",
"leg_inf_dooku")
SetAttackingTeam(ATT)
SetupTeams{
LEG = {
team = LEG,
units = 32,
reinforcements = 150,
soldier = { "leg_inf_vader",7, 25},
assault = { "leg_inf_sidious",1, 4},
engineer = { "leg_inf_krayt", 1, 4},
sniper = { "leg_inf_nihilus",1, 4},
officer = { "leg_inf_malak", 1, 4},
special = { "leg_inf_sion",1, 4},
},
}
SetupTeams{
END = {
team = END,
units = 32,
reinforcements = 150,
soldier = { "leg_inf_revan",7, 25},
assault = { "leg_inf_kyloren",1, 4},
engineer = { "leg_inf_starkiller", 1, 4},
sniper = { "leg_inf_bane",1, 4},
officer = { "leg_inf_maul", 1, 4},
special = { "leg_inf_dooku",1, 4},
},
locals = {
team = 3,
units = 0,
reinforcements = -1,
},
}
SetTeamAsEnemy(3,3)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 4)
local weaponCnt = 220
SetMemoryPoolSize("Aimer", 15)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 200)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 20)
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 133)
SetMemoryPoolSize("FlagItem", 2)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize("MountedTurret", 3)
SetMemoryPoolSize("Obstacle", 309)
SetMemoryPoolSize("TreeGridStack", 200)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:2SW\\mus1.lvl", "ffa_mus1")
ReadDataFile("mus\\mus1.lvl", "MUS1_CONQUEST")
SetDenseEnvironment("false")
--AddDeathRegion("Sarlac01")
SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight(90)
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("sound\\mus.lvl", "mus1")
OpenAudioStream("sound\\mus.lvl", "mus1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\mus.lvl", "mus1_emt")
SetAmbientMusic(LEG, 1.0, "rep_mus_amb_start", 0,1)
SetAmbientMusic(LEG, 0.8, "rep_mus_amb_middle", 1,1)
SetAmbientMusic(LEG, 0.2,"rep_mus_amb_end", 2,1)
SetAmbientMusic(END, 1.0, "cis_mus_amb_start", 0,1)
SetAmbientMusic(END, 0.8, "cis_mus_amb_middle", 1,1)
SetAmbientMusic(END, 0.2,"cis_mus_amb_end", 2,1)
SetVictoryMusic(LEG, "rep_mus_amb_victory")
SetDefeatMusic (LEG, "rep_mus_amb_defeat")
SetVictoryMusic(END, "cis_mus_amb_victory")
SetDefeatMusic (END, "cis_mus_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
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")
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
[/code]
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")
---------------------------------------------------------------------------
-- 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")
PlayAnimRise()
DisableBarriers("BALCONEY")
DisableBarriers("bALCONEY2")
DisableBarriers("hallway_f")
DisableBarriers("hackdoor")
DisableBarriers("outside")
OnObjectRespawnName(PlayAnimRise, "DingDong");
OnObjectKillName(PlayAnimDrop, "DingDong");
KillObject("cp1") -- uses FFA spawn paths
KillObject("cp2")
KillObject("cp3")
KillObject("cp4")
KillObject("cp5")
KillObject("cp6")
DisableAIAutoBalance() -- makes bots harder
SetAIDifficulty(10,10,"medium")
SetAIDifficulty(10,10,"hard")
players = {} -- list of characters
scores = {} -- list of scores
unitcount = 0 -- number of players
scorelimit = 50
Player_Stats_Points = { -- controlling how points are earned
{ point_gain = 0 }, --// PS_GLB_KILL_AI_PLAYER = 0,
{ point_gain = 0 }, --// PS_GLB_KILL_HUMAN_PLAYER,
{ point_gain = 0 }, --// PS_GLB_KILL_HUMAN_PLAYER_AI_OFF,
{ point_gain = 0 }, --// PS_GLB_KILL_SUICIDE,
{ point_gain = 0 }, --// PS_GLB_KILL_TEAMMATE,
--//
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_INFANTRY_VS_VEHICLE,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_LIGHT_VS_HEAVY,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_LIGHT_VS_MEDIUM,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_HEAVY_VS_LIGHT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_HEAVY_VS_MEDIUM,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_MEDIUM_VS_LIGHT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_MEDIUM_VS_HEAVY,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_ATAT,
{ point_gain = 0 }, --// PS_GLB_VEHICLE_KILL_EMPTY,
--//
{ point_gain = 0 }, --// PS_GLB_HEAL,
{ point_gain = 0 }, --// PS_GLB_REPAIR,
--//
{ point_gain = 0 }, --// PS_GLB_SNIPER_ACCURACY,
{ point_gain = 0 }, --// PS_GLB_HEAVY_WEAPON_MULTI_KILL,
{ point_gain = 0 }, --// PS_GLB_RAMPAGE,
{ point_gain = 0 }, --// PS_GLB_HEAD_SHOT,
{ point_gain = 0 }, --// PS_GLB_KILL_HERO,
--//
--// // conquest
{ point_gain = 0 }, --// PS_CON_CAPTURE_CP,
{ point_gain = 0 }, --// PS_CON_ASSIST_CAPTURE_CP,
{ point_gain = 0 }, --// PS_CON_KILL_ENEMY_CAPTURING_CP,
{ point_gain = 0 }, --// PS_CON_DEFEND_CP,
{ point_gain = 0 }, --// PS_CON_KING_HILL,
--//
--// // capture the flag
{ point_gain = 0 }, --// PS_CAP_PICKUP_FLAG,
{ point_gain = 0 }, --// PS_CAP_DEFEND_FLAG,
{ point_gain = 0 }, --// PS_CAP_CAPTURE_FLAG,
{ point_gain = 0 }, --// PS_CAP_DEFEND_FLAG_CARRIER,
{ point_gain = 0 }, --// PS_CAP_KILL_ENEMY_FLAG_CARRIER,
{ point_gain = 0 }, --// PS_CAP_KILL_ALLY_FLAG_CARRIER,
--//
--// // assault
{ point_gain = 1 }, --// PS_Diet Dr. Pepper_DESTROY_ASSAULT_OBJ,
--//
--// // escort
{ point_gain = 0 }, --// PS_ESC_DEFEND,
--//
--// // defend
{ point_gain = 0 },} --// PS_DEF_DEFEND,
ScriptCB_SetPlayerStatsPoints( Player_Stats_Points )
Player_Stats_Points = nil
spawn = OnCharacterSpawn(function(character) -- register and set up players
local player = character
local new = true
local index = unitcount
local i = 1
for i = 1,index do
if players == player then -- this character is already registered with index i
new = false
end
end
if new then -- this character has not been registered yet
unitcount = unitcount + 1
index = unitcount
players[index] = player
scores[index] = 0
end
SetObjectTeam(GetCharacterUnit(player),3)
end)
kill = OnCharacterDeath(function(character,killer)
if killer and (not (character == killer)) then
local player = killer
local index = unitcount
local i = 1
for i = 1,index do
if players == player then
AddAssaultDestroyPoints(player)
scores = scores + 1
if scores == scorelimit then
MissionVictory(GetCharacterTeam(player))
end
end
end
end
local max1 = 0 -- recomputing max score
local max2 = 0 -- recomputing second highest score
for j=1,unitcount do
if scores[j] > max1 then
max2 = max1
max1 = scores[j]
else
if scores[j] > max2 then
max2 = scores[j]
end
end
end
SetTeamPoints(2,max1) -- Team 2 has highest score
SetTeamPoints(1,max2) -- Team 1 has second highest score
end)
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, multiplayerScoreLimit = 100, pointsPerKillATT = 0, pointsPerKillDEF = 0, textATT = "game.modes.dm1", textDEF = "game.modes.dm2", multiplayerRules = true, isCelebrityDeathmatch = false, isUberMode = true, uberScoreLimit = scorelimit}
TDM:Start()
ClearAIGoals(1)
ClearAIGoals(2)
ClearAIGoals(3)
AddAIGoal(1,"Deathmatch",1000)
AddAIGoal(2,"Deathmatch",1000)
AddAIGoal(3,"Deathmatch",1000)
if (ScriptCB_GetCONMaxTimeLimit() > 0) then
endtimer= CreateTimer("endtimer")
SetTimerValue(endtimer, ScriptCB_GetCONMaxTimeLimit())
ShowTimer(endtimer)
StartTimer(endtimer)
OnTimerElapse(function(timer)
MissionDefeat({1,2})
DestroyTimer(timer)
end,
endtimer)
end
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()
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(3600000)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo
ReadDataFile("ingame.lvl")
-- Republic Attacking (attacker is always #1)
local LEG = 1
local END = 2
-- These variables do not change
local ATT = 1
local DEF = 2
SetTeamAggressiveness(LEG, 0.95)
SetTeamAggressiveness(END, 0.95)
SetTeamName(1, "Legends 1")
SetTeamName(2, "Legends 2")
AISnipeSuitabilityDist(30)
ReadDataFile("sound\\mus.lvl;mus1cw")
ReadDataFile("dc:SIDE\\leg.lvl",
"leg_inf_vader",
"leg_inf_sidious",
"leg_inf_krayt",
"leg_inf_nihilus",
"leg_inf_malak",
"leg_inf_sion",
"leg_inf_kyloren",
"leg_inf_revan",
"leg_inf_starkiller",
"leg_inf_bane",
"leg_inf_maul",
"leg_inf_dooku")
SetAttackingTeam(ATT)
SetupTeams{
LEG = {
team = LEG,
units = 32,
reinforcements = 150,
soldier = { "leg_inf_vader",7, 25},
assault = { "leg_inf_sidious",1, 4},
engineer = { "leg_inf_krayt", 1, 4},
sniper = { "leg_inf_nihilus",1, 4},
officer = { "leg_inf_malak", 1, 4},
special = { "leg_inf_sion",1, 4},
},
}
SetupTeams{
END = {
team = END,
units = 32,
reinforcements = 150,
soldier = { "leg_inf_revan",7, 25},
assault = { "leg_inf_kyloren",1, 4},
engineer = { "leg_inf_starkiller", 1, 4},
sniper = { "leg_inf_bane",1, 4},
officer = { "leg_inf_maul", 1, 4},
special = { "leg_inf_dooku",1, 4},
},
locals = {
team = 3,
units = 0,
reinforcements = -1,
},
}
SetTeamAsEnemy(3,3)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 4)
local weaponCnt = 220
SetMemoryPoolSize("Aimer", 15)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 200)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 20)
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 133)
SetMemoryPoolSize("FlagItem", 2)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize("MountedTurret", 3)
SetMemoryPoolSize("Obstacle", 309)
SetMemoryPoolSize("TreeGridStack", 200)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:2SW\\mus1.lvl", "ffa_mus1")
ReadDataFile("mus\\mus1.lvl", "MUS1_CONQUEST")
SetDenseEnvironment("false")
--AddDeathRegion("Sarlac01")
SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight(90)
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("sound\\mus.lvl", "mus1")
OpenAudioStream("sound\\mus.lvl", "mus1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\mus.lvl", "mus1_emt")
SetAmbientMusic(LEG, 1.0, "rep_mus_amb_start", 0,1)
SetAmbientMusic(LEG, 0.8, "rep_mus_amb_middle", 1,1)
SetAmbientMusic(LEG, 0.2,"rep_mus_amb_end", 2,1)
SetAmbientMusic(END, 1.0, "cis_mus_amb_start", 0,1)
SetAmbientMusic(END, 0.8, "cis_mus_amb_middle", 1,1)
SetAmbientMusic(END, 0.2,"cis_mus_amb_end", 2,1)
SetVictoryMusic(LEG, "rep_mus_amb_victory")
SetDefeatMusic (LEG, "rep_mus_amb_defeat")
SetVictoryMusic(END, "cis_mus_amb_victory")
SetDefeatMusic (END, "cis_mus_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
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")
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
[/code]


