Help... Space map IMP vs. REP crashes
Posted: Tue Aug 12, 2008 1:25 pm
by Redline
Hello everyone.
I have big problem to find the mistake in my space map.
The thing what I try to load is imp vs rep in the same space map , but it doesn't work.
My guess is, that the problem is in the script.
Now look at my scripts and tell me what's wrong ,pls
thx in advance
RGSc_Diet Dr. Pepper
RGSc_cmn
I have big problem to find the mistake in my space map.
The thing what I try to load is imp vs rep in the same space map , but it doesn't work.
My guess is, that the problem is in the script.
Now look at my scripts and tell me what's wrong ,pls
thx in advance
RGSc_Diet Dr. Pepper
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Assault File
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("RGSc_cmn")
ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("LinkedShields")
ScriptCB_DoFile("LinkedDestroyables")
myGameMode = "RGS_CW-Assault"
function myScriptInit()
SetMemoryPoolSize("CommandFlyer", 2)
end
function ScriptPostLoad()
SetupObjectives()
SetupShields()
SetupDestroyables()
SetupTurrets()
AddAIGoal(REP, "Deathmatch", 100)
AddAIGoal(IMP, "Deathmatch", 100)
DisableSmallMapMiniMap()
end
function SetupObjectives()
assault = ObjectiveSpaceAssault:New{
teamATT = REP, teamDEF = IMP,
multiplayerRules = true
}
local repTargets = {
engines = { "imp_drive_1", "imp_drive_2", "imp_drive_3" },
lifesupport = "imp-life-ext",
bridge = "imp-bridge",
comm = "imp-comms",
sensors = "imp-sensors",
frigates = "imp-frigate",
internalSys = { "imp-life-int", "imp-engines" },
}
local impTargets = {
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( "imp", impTargets, false )
assault:Start()
end
function SetupShields()
-- IMP Shielded objects
local linkedShieldObjectsIMP = { "imp_ship_1", "imp_ship_2", "imp_ship_3", "imp_ship_4", "imp_ship_5", "imp_ship_6",
"imp-bridge", "imp-comms", "imp-life-ext", "imp-sensors",
"imp_drive_1", "imp_drive_2", "imp_drive_3"}
shieldStuffIMP = LinkedShields:New{objs = linkedShieldObjectsIMP, controllerObject = "imp-shield"}
shieldStuffIMP:Init()
function shieldStuffIMP:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", REP)
ShowMessageText("level.spa.hangar.shields.def.down", IMP)
BroadcastVoiceOver( "IOSMP_obj_17", IMP )
BroadcastVoiceOver( "ROSMP_obj_16", REP )
end
function shieldStuffIMP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", REP)
ShowMessageText("level.spa.hangar.shields.def.up", IMP)
BroadcastVoiceOver( "IOSMP_obj_19", IMP )
BroadcastVoiceOver( "ROSMP_obj_18", REP )
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", IMP)
ShowMessageText("level.spa.hangar.shields.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_17", REP )
BroadcastVoiceOver( "IOSMP_obj_16", IMP )
end
function shieldStuffREP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", IMP)
ShowMessageText("level.spa.hangar.shields.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_19", REP )
BroadcastVoiceOver( "IOSMP_obj_18", IMP )
end
end
function SetupDestroyables()
--IMP destroyables
lifeSupportLinkageIMP = LinkedDestroyables:New{ objectSets = {{"imp-life-int"}, {"imp-life-ext"}} }
lifeSupportLinkageIMP:Init()
engineLinkageIMP = LinkedDestroyables:New{ objectSets = {{"imp_drive_1", "imp_drive_2", "imp_drive_3"}, {"imp-engines"}} }
engineLinkageIMP:Init()
--REP destroyables
lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"rep-life-int"}, {"rep-life-ext"}} }
lifeSupportLinkageREP:Init()
engineLinkageREP = LinkedDestroyables:New{ objectSets = {{"rep_drive_1"}, {"rep-engines"}} }
engineLinkageREP:Init()
end
[/code]
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Assault File
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("RGSc_cmn")
ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("LinkedShields")
ScriptCB_DoFile("LinkedDestroyables")
myGameMode = "RGS_CW-Assault"
function myScriptInit()
SetMemoryPoolSize("CommandFlyer", 2)
end
function ScriptPostLoad()
SetupObjectives()
SetupShields()
SetupDestroyables()
SetupTurrets()
AddAIGoal(REP, "Deathmatch", 100)
AddAIGoal(IMP, "Deathmatch", 100)
DisableSmallMapMiniMap()
end
function SetupObjectives()
assault = ObjectiveSpaceAssault:New{
teamATT = REP, teamDEF = IMP,
multiplayerRules = true
}
local repTargets = {
engines = { "imp_drive_1", "imp_drive_2", "imp_drive_3" },
lifesupport = "imp-life-ext",
bridge = "imp-bridge",
comm = "imp-comms",
sensors = "imp-sensors",
frigates = "imp-frigate",
internalSys = { "imp-life-int", "imp-engines" },
}
local impTargets = {
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( "imp", impTargets, false )
assault:Start()
end
function SetupShields()
-- IMP Shielded objects
local linkedShieldObjectsIMP = { "imp_ship_1", "imp_ship_2", "imp_ship_3", "imp_ship_4", "imp_ship_5", "imp_ship_6",
"imp-bridge", "imp-comms", "imp-life-ext", "imp-sensors",
"imp_drive_1", "imp_drive_2", "imp_drive_3"}
shieldStuffIMP = LinkedShields:New{objs = linkedShieldObjectsIMP, controllerObject = "imp-shield"}
shieldStuffIMP:Init()
function shieldStuffIMP:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", REP)
ShowMessageText("level.spa.hangar.shields.def.down", IMP)
BroadcastVoiceOver( "IOSMP_obj_17", IMP )
BroadcastVoiceOver( "ROSMP_obj_16", REP )
end
function shieldStuffIMP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", REP)
ShowMessageText("level.spa.hangar.shields.def.up", IMP)
BroadcastVoiceOver( "IOSMP_obj_19", IMP )
BroadcastVoiceOver( "ROSMP_obj_18", REP )
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", IMP)
ShowMessageText("level.spa.hangar.shields.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_17", REP )
BroadcastVoiceOver( "IOSMP_obj_16", IMP )
end
function shieldStuffREP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", IMP)
ShowMessageText("level.spa.hangar.shields.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_19", REP )
BroadcastVoiceOver( "IOSMP_obj_18", IMP )
end
end
function SetupDestroyables()
--IMP destroyables
lifeSupportLinkageIMP = LinkedDestroyables:New{ objectSets = {{"imp-life-int"}, {"imp-life-ext"}} }
lifeSupportLinkageIMP:Init()
engineLinkageIMP = LinkedDestroyables:New{ objectSets = {{"imp_drive_1", "imp_drive_2", "imp_drive_3"}, {"imp-engines"}} }
engineLinkageIMP:Init()
--REP destroyables
lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"rep-life-int"}, {"rep-life-ext"}} }
lifeSupportLinkageREP:Init()
engineLinkageREP = LinkedDestroyables:New{ objectSets = {{"rep_drive_1"}, {"rep-engines"}} }
engineLinkageREP:Init()
end
[/code]
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Common File
-- Common script that shares all setup information
--
ScriptCB_DoFile("setup_teams")
-- Republic Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
function SetupUnits()
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_pilot",
"rep_inf_ep3_marine",
"rep_fly_anakinstarfighter_sc",
"rep_fly_arc170fighter_sc",
"rep_veh_remote_terminal",
"rep_fly_gunship_sc",
"rep_fly_vwing")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof"
)
end
myTeamConfig = {
rep = {
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",26},
marine = { "rep_inf_ep3_marine",6},
},
imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",26},
marine = { "imp_inf_marine",6},
}
}
ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--REP turrets
turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "rep_cap2_liquidgen",
turrets = {"rep_cap2_tur1", "rep_cap2_tur2", "rep_cap2_tur3", "rep_cap2_tur4", "rep_cap2_tur5", "rep_cap2_biggun2"} }
turretLinkageREP:Init()
function turretLinkageREP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_21", REP )
BroadcastVoiceOver( "COSMP_obj_20", IMP )
end
function turretLinkageREP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_23", REP )
BroadcastVoiceOver( "COSMP_obj_22", IMP )
end
--IMP turrets
turretLinkageIMP = LinkedTurrets:New{ team = IMP, mainframe = "imp-defense",
turrets = {"imp_turr_1", "imp_turr_2", "imp_turr_3", "imp_turr_4", "imp_turr_5", "imp_turr_6"} }
turretLinkageIMP:Init()
function turretLinkageIMP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
ShowMessageText("level.spa.hangar.mainframe.def.down", IMP)
BroadcastVoiceOver( "IOSMP_obj_21", IMP )
BroadcastVoiceOver( "ROSMP_obj_20", REP )
end
function turretLinkageIMP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", REP)
ShowMessageText("level.spa.hangar.mainframe.def.up", IMP)
BroadcastVoiceOver( "IOSMP_obj_23", IMP )
BroadcastVoiceOver( "ROSMP_obj_22", REP )
end
end
-- adjust extents to fit cap ship
function ScriptPreInit()
SetWorldExtents(2650)
ScriptPreInit = nil
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()
-- Designers, this line *MUST* be first!
ReadDataFile("ingame.lvl")
SetMinFlyHeight(-1800)
SetMaxFlyHeight(1800)
SetMinPlayerFlyHeight(-1800)
SetMaxPlayerFlyHeight(1800)
SetAIVehicleNotifyRadius(100)
ReadDataFile("sound\\spa.lvl;spa4cross")
ScriptCB_SetDopplerFactor(0.4)
ScaleSoundParameter("tur_weapons", "MinDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MaxDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MuteDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MinDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MaxDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MuteDistance", 3.0);
ScaleSoundParameter("explosion", "MaxDistance", 5.0);
ScaleSoundParameter("explosion", "MuteDistance", 5.0);
SetupUnits()
SetupTeams(myTeamConfig)
-- Level Stats
ClearWalkers()
local weaponCnt = 250
local guyCnt = 32
local units = 72
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 73)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 0)
SetMemoryPoolSize("EntityDroideka",0)
SetMemoryPoolSize("EntityDroid",0)
SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityFlyer", 36)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1500)
SetMemoryPoolSize("ParticleTransformer::ColorTrans" , 1784)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 1500)
SetMemoryPoolSize("EntityLight", 100)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("EntitySoldier",guyCnt)
SetMemoryPoolSize("SoldierAnimation", 200)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 70)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 150)
SetMemoryPoolSize("PassengerSlot", 0)
SetMemoryPoolSize("PathNode", 92)
SetMemoryPoolSize("UnitAgent", units)
SetMemoryPoolSize("UnitController", units)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("Combo::DamageSample", 0)
SetSpawnDelay(10.0, 0.25)
-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end
ReadDataFile("dc:RGS\\spa_sky.lvl", "end")
ReadDataFile("dc:RGS\\RGS.lvl", myGameMode)
SetDenseEnvironment("false")
SetParticleLODBias(15000)
-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
local 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\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\tat.lvl", "tat1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(IMP, REP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(REP, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(REP, "Repleaving")
SetOutOfBoundsVoiceOver(IMP, "impleaving")
SetAmbientMusic(REP, 1.0, "rep_spa_amb_start", 0,1)
SetAmbientMusic(REP, 0.99, "rep_spa_amb_middle", 1,1)
SetAmbientMusic(REP, 0.1,"rep_spa_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_spa_amb_start", 0,1)
SetAmbientMusic(IMP, 0.99, "imp_spa_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.1,"imp_spa_amb_end", 2,1)
SetVictoryMusic(REP, "rep_spa_amb_victory")
SetDefeatMusic (REP, "rep_spa_amb_defeat")
SetVictoryMusic(IMP, "imp_spa_amb_victory")
SetDefeatMusic (IMP, "imp_spa_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")
-- Camera Stats Battle over Felucia
-- Rep ship from behind
AddCameraShot(0.998795, -0.041143, -0.026739, -0.001101, -720.435303, 809.024963, 2779.057129);
-- CIS ship from behind
AddCameraShot(0.028389, -0.001117, -0.998823, -0.039312, -629.853760, 809.024963, -2050.946289);
-- Overall from right side of map
AddCameraShot(-0.335210, 0.057062, -0.927078, -0.157814, 1372.964233, 1940.014038, -2266.423828);
-- Overall from left side of map
AddCameraShot(0.911880, -0.246677, -0.316680, -0.085667, -2183.282471, 1940.014038, 2760.666748);
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddLandingRegion("rep-CP1Con")
AddLandingRegion("imp-CP1Con")
end
[/code]
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Common File
-- Common script that shares all setup information
--
ScriptCB_DoFile("setup_teams")
-- Republic Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2
function SetupUnits()
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_pilot",
"rep_inf_ep3_marine",
"rep_fly_anakinstarfighter_sc",
"rep_fly_arc170fighter_sc",
"rep_veh_remote_terminal",
"rep_fly_gunship_sc",
"rep_fly_vwing")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof"
)
end
myTeamConfig = {
rep = {
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",26},
marine = { "rep_inf_ep3_marine",6},
},
imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",26},
marine = { "imp_inf_marine",6},
}
}
ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--REP turrets
turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "rep_cap2_liquidgen",
turrets = {"rep_cap2_tur1", "rep_cap2_tur2", "rep_cap2_tur3", "rep_cap2_tur4", "rep_cap2_tur5", "rep_cap2_biggun2"} }
turretLinkageREP:Init()
function turretLinkageREP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.down", REP)
BroadcastVoiceOver( "ROSMP_obj_21", REP )
BroadcastVoiceOver( "COSMP_obj_20", IMP )
end
function turretLinkageREP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", IMP)
ShowMessageText("level.spa.hangar.mainframe.def.up", REP)
BroadcastVoiceOver( "ROSMP_obj_23", REP )
BroadcastVoiceOver( "COSMP_obj_22", IMP )
end
--IMP turrets
turretLinkageIMP = LinkedTurrets:New{ team = IMP, mainframe = "imp-defense",
turrets = {"imp_turr_1", "imp_turr_2", "imp_turr_3", "imp_turr_4", "imp_turr_5", "imp_turr_6"} }
turretLinkageIMP:Init()
function turretLinkageIMP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
ShowMessageText("level.spa.hangar.mainframe.def.down", IMP)
BroadcastVoiceOver( "IOSMP_obj_21", IMP )
BroadcastVoiceOver( "ROSMP_obj_20", REP )
end
function turretLinkageIMP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", REP)
ShowMessageText("level.spa.hangar.mainframe.def.up", IMP)
BroadcastVoiceOver( "IOSMP_obj_23", IMP )
BroadcastVoiceOver( "ROSMP_obj_22", REP )
end
end
-- adjust extents to fit cap ship
function ScriptPreInit()
SetWorldExtents(2650)
ScriptPreInit = nil
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()
-- Designers, this line *MUST* be first!
ReadDataFile("ingame.lvl")
SetMinFlyHeight(-1800)
SetMaxFlyHeight(1800)
SetMinPlayerFlyHeight(-1800)
SetMaxPlayerFlyHeight(1800)
SetAIVehicleNotifyRadius(100)
ReadDataFile("sound\\spa.lvl;spa4cross")
ScriptCB_SetDopplerFactor(0.4)
ScaleSoundParameter("tur_weapons", "MinDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MaxDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MuteDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MinDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MaxDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MuteDistance", 3.0);
ScaleSoundParameter("explosion", "MaxDistance", 5.0);
ScaleSoundParameter("explosion", "MuteDistance", 5.0);
SetupUnits()
SetupTeams(myTeamConfig)
-- Level Stats
ClearWalkers()
local weaponCnt = 250
local guyCnt = 32
local units = 72
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 73)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 0)
SetMemoryPoolSize("EntityDroideka",0)
SetMemoryPoolSize("EntityDroid",0)
SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityFlyer", 36)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1500)
SetMemoryPoolSize("ParticleTransformer::ColorTrans" , 1784)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 1500)
SetMemoryPoolSize("EntityLight", 100)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("EntitySoldier",guyCnt)
SetMemoryPoolSize("SoldierAnimation", 200)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 70)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 150)
SetMemoryPoolSize("PassengerSlot", 0)
SetMemoryPoolSize("PathNode", 92)
SetMemoryPoolSize("UnitAgent", units)
SetMemoryPoolSize("UnitController", units)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("Combo::DamageSample", 0)
SetSpawnDelay(10.0, 0.25)
-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end
ReadDataFile("dc:RGS\\spa_sky.lvl", "end")
ReadDataFile("dc:RGS\\RGS.lvl", myGameMode)
SetDenseEnvironment("false")
SetParticleLODBias(15000)
-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
local 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\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\tat.lvl", "tat1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(IMP, REP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(REP, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(REP, "Repleaving")
SetOutOfBoundsVoiceOver(IMP, "impleaving")
SetAmbientMusic(REP, 1.0, "rep_spa_amb_start", 0,1)
SetAmbientMusic(REP, 0.99, "rep_spa_amb_middle", 1,1)
SetAmbientMusic(REP, 0.1,"rep_spa_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_spa_amb_start", 0,1)
SetAmbientMusic(IMP, 0.99, "imp_spa_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.1,"imp_spa_amb_end", 2,1)
SetVictoryMusic(REP, "rep_spa_amb_victory")
SetDefeatMusic (REP, "rep_spa_amb_defeat")
SetVictoryMusic(IMP, "imp_spa_amb_victory")
SetDefeatMusic (IMP, "imp_spa_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")
-- Camera Stats Battle over Felucia
-- Rep ship from behind
AddCameraShot(0.998795, -0.041143, -0.026739, -0.001101, -720.435303, 809.024963, 2779.057129);
-- CIS ship from behind
AddCameraShot(0.028389, -0.001117, -0.998823, -0.039312, -629.853760, 809.024963, -2050.946289);
-- Overall from right side of map
AddCameraShot(-0.335210, 0.057062, -0.927078, -0.157814, 1372.964233, 1940.014038, -2266.423828);
-- Overall from left side of map
AddCameraShot(0.911880, -0.246677, -0.316680, -0.085667, -2183.282471, 1940.014038, 2760.666748);
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddLandingRegion("rep-CP1Con")
AddLandingRegion("imp-CP1Con")
end
[/code]