Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Assault File
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("CSBc_cmn")
ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("LinkedShields")
ScriptCB_DoFile("LinkedDestroyables")
myGameMode = "CSB_CW-Assault"
function myScriptInit()
SetMemoryPoolSize("CommandFlyer", 2)
end
function ScriptPostLoad()
SetupObjectives()
SetupShields()
SetupDestroyables()
SetupTurrets()
AddAIGoal(REP, "Deathmatch", 100)
AddAIGoal(CIS, "Deathmatch", 100)
DisableSmallMapMiniMap()
end
function SetupObjectives()
assault = ObjectiveSpaceAssault:New{
teamATT = REP, teamDEF = CIS,
multiplayerRules = true
}
local repTargets = {
engines = { "cis_drive_1", "cis_drive_2" },
lifesupport = "cis-life-ext",
bridge = "cis-bridge",
comm = "cis-comms",
sensors = "cis-sensors",
frigates = "cis-frigate",
internalSys = { "cis-life-int", "cis-engines" },
}
local cisTargets = {
engines = "rep_drive_1",
lifesupport = "rep-life-ext",
bridge = "rep-bridge",
comm = "rep-comms",
sensors = "rep-sensors",
frigates = "rep-frigate",
internalSys = { "rep-life-int", "rep-engines" },
}
assault:SetupAllCriticalSystems( "rep", repTargets, true )
assault:SetupAllCriticalSystems( "cis", cisTargets, false )
assault:Start()
end
function SetupShields()
-- CIS Shielded objects
local linkedShieldObjectsCIS = { "cis_ship_1",
"cis-bridge", "cis-comms", "cis-life-ext", "cis-sensors",
"cis_drive_1", "cis_drive_2"}
shieldStuffCIS = LinkedShields:New{objs = linkedShieldObjectsCIS, controllerObject = "cis-shield"}
shieldStuffCIS:Init()
function shieldStuffCIS:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", REP)
ShowMessageText("level.spa.hangar.shields.def.down", CIS)
BroadcastVoiceOver( "ROSMP_obj_16", REP )
BroadcastVoiceOver( "COSMP_obj_17", CIS )
end
function shieldStuffCIS:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", REP)
ShowMessageText("level.spa.hangar.shields.def.up", CIS)
BroadcastVoiceOver( "ROSMP_obj_18", REP )
BroadcastVoiceOver( "COSMP_obj_19", CIS )
end
-- REP Shielded objects
local linkedShieldObjectsREP = { "rep_ship_1", "rep_ship_2", "rep_ship_3", "rep_ship_4",
"rep-bridge", "rep-comms", "rep-life-ext", "rep-sensors",
"rep_drive_1"}
shieldStuffREP = LinkedShields:New{objs = linkedShieldObjectsREP, controllerObject = "rep-shield"}
shieldStuffREP:Init()
function shieldStuffREP:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", CIS)
ShowMessageText("level.spa.hangar.shields.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_17", REP )
BroadcastVoiceOver( "COSMP_obj_16", CIS )
end
function shieldStuffREP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", CIS)
ShowMessageText("level.spa.hangar.shields.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_19", REP )
BroadcastVoiceOver( "COSMP_obj_18", CIS )
end
end
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Assault File
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("CSBc_cmn")
ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("LinkedShields")
ScriptCB_DoFile("LinkedDestroyables")
myGameMode = "CSB_CW-Assault"
function myScriptInit()
SetMemoryPoolSize("CommandFlyer", 2)
end
function ScriptPostLoad()
SetupObjectives()
SetupShields()
SetupDestroyables()
SetupTurrets()
AddAIGoal(REP, "Deathmatch", 100)
AddAIGoal(CIS, "Deathmatch", 100)
DisableSmallMapMiniMap()
end
function SetupObjectives()
assault = ObjectiveSpaceAssault:New{
teamATT = REP, teamDEF = CIS,
multiplayerRules = true
}
local repTargets = {
engines = { "cis_drive_1", "cis_drive_2" },
lifesupport = "cis-life-ext",
bridge = "cis-bridge",
comm = "cis-comms",
sensors = "cis-sensors",
frigates = "cis-frigate",
internalSys = { "cis-life-int", "cis-engines" },
}
local cisTargets = {
engines = "rep_drive_1",
lifesupport = "rep-life-ext",
bridge = "rep-bridge",
comm = "rep-comms",
sensors = "rep-sensors",
frigates = "rep-frigate",
internalSys = { "rep-life-int", "rep-engines" },
}
assault:SetupAllCriticalSystems( "rep", repTargets, true )
assault:SetupAllCriticalSystems( "cis", cisTargets, false )
assault:Start()
end
function SetupShields()
-- CIS Shielded objects
local linkedShieldObjectsCIS = { "cis_ship_1",
"cis-bridge", "cis-comms", "cis-life-ext", "cis-sensors",
"cis_drive_1", "cis_drive_2"}
shieldStuffCIS = LinkedShields:New{objs = linkedShieldObjectsCIS, controllerObject = "cis-shield"}
shieldStuffCIS:Init()
function shieldStuffCIS:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", REP)
ShowMessageText("level.spa.hangar.shields.def.down", CIS)
BroadcastVoiceOver( "ROSMP_obj_16", REP )
BroadcastVoiceOver( "COSMP_obj_17", CIS )
end
function shieldStuffCIS:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", REP)
ShowMessageText("level.spa.hangar.shields.def.up", CIS)
BroadcastVoiceOver( "ROSMP_obj_18", REP )
BroadcastVoiceOver( "COSMP_obj_19", CIS )
end
-- REP Shielded objects
local linkedShieldObjectsREP = { "rep_ship_1", "rep_ship_2", "rep_ship_3", "rep_ship_4",
"rep-bridge", "rep-comms", "rep-life-ext", "rep-sensors",
"rep_drive_1"}
shieldStuffREP = LinkedShields:New{objs = linkedShieldObjectsREP, controllerObject = "rep-shield"}
shieldStuffREP:Init()
function shieldStuffREP:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", CIS)
ShowMessageText("level.spa.hangar.shields.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_17", REP )
BroadcastVoiceOver( "COSMP_obj_16", CIS )
end
function shieldStuffREP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", CIS)
ShowMessageText("level.spa.hangar.shields.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_19", REP )
BroadcastVoiceOver( "COSMP_obj_18", CIS )
end
end
NOTE: I will hopefully be adding more ships later (a lot more ships) that will need they're own shields as well. Please give me an answer on how to do this as well.




