Now, I hope you guys can help me find my errors (bracket type stuff). This is a space map, so I have two .lua files.
Thank you for your time. I assure you that your time is being used to make a great map!
I haven't even tested the map though, so I hope this can be sorted out.
Here is my RE2g_Diet Dr. Pepper.lua file:
Code: Select all
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Galactic Civil War Template Assault File
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("RE2g_cmn")
ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("LinkedShields")
ScriptCB_DoFile("LinkedDestroyables")
myGameMode = "RE2_GCW-Assault"
function ScriptPostLoad()
SetupObjectives()
SetupShields()
SetupDestroyables()
SetupTurrets()
AddAIGoal(ALL, "Deathmatch", 100)
AddAIGoal(IMP, "Deathmatch", 100)
DisableSmallMapMiniMap()
end
function SetupObjectives()
assault = ObjectiveSpaceAssault:New{
teamATT = IMP, teamDEF = ALL,
multiplayerRules = true
}
local impTargets = {
engines = { "cis_drive_1", "cis_drive_2" },
bridge = "cis-bridge",
frigates = { "all-frigate", "all-frigate2", "all-frigate3", "all-frigate4", "all-frigate5", "all-frigate6", "all-frigate7", "all-frigate8", "all-frigate9", "all-frigate10", "all-frigate11", "all-frigate12" },
internalSys = { "cis-life-int", "cis-engines" },
}
local allTargets = {
engines = "rep_drive_1",
bridge = "rep-bridge",
frigates = { "rep-frigate", "rep-frigate2" },
internalSys = { "rep-life-int", "rep-engines" },
}
assault:SetupAllCriticalSystems( "imp", impTargets, true )
assault:SetupAllCriticalSystems( "all", allTargets, false )
assault:Start()
end
function SetupShields()
-- ALL Shielded objects
local linkedShieldObjectsALL = { "cis_ship_1", "cis_ship_2", "cis_ship_3", "cis_ship_4", "cis-bridge", "cis_drive_1", "cis_drive_2"}
shieldStuffALL = LinkedShields:New{objs = linkedShieldObjectsALL, controllerObject = "cis-shield"}
shieldStuffALL:Init()
function shieldStuffALL:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", IMP)
ShowMessageText("level.spa.hangar.shields.def.down", ALL)
BroadcastVoiceOver( "IOSMP_obj_16", IMP )
BroadcastVoiceOver( "AOSMP_obj_17", ALL )
end
function shieldStuffALL:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", IMP)
ShowMessageText("level.spa.hangar.shields.def.up", ALL)
BroadcastVoiceOver( "IOSMP_obj_18", IMP )
BroadcastVoiceOver( "AOSMP_obj_19", ALL )
end
-- IMP Shielded objects
local linkedShieldObjectsIMP = { "rep_ship_1", "rep_ship_2", "rep_ship_3", "rep_ship_4", "rep-bridge", "rep_drive_1"}
shieldStuffIMP = LinkedShields:New{objs = linkedShieldObjectsIMP, controllerObject = "rep-shield"}
shieldStuffIMP:Init()
function shieldStuffIMP:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", ALL)
ShowMessageText("level.spa.hangar.shields.def.down", IMP)
BroadcastVoiceOver( "IOSMP_obj_17", IMP )
BroadcastVoiceOver( "AOSMP_obj_16", ALL )
end
function shieldStuffIMP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", ALL)
ShowMessageText("level.spa.hangar.shields.def.up", IMP)
BroadcastVoiceOver( "IOSMP_obj_19", IMP )
BroadcastVoiceOver( "AOSMP_obj_18", ALL )
end
end
function SetupDestroyables()
engineLinkageCIS = LinkedDestroyables:New{ objectSets = {{"cis_drive_1", "cis_drive_2"}, {"cis-engines"}} }
engineLinkageCIS:Init()
engineLinkageREP = LinkedDestroyables:New{ objectSets = {{"rep_drive_1"}, {"rep-engines"}} }
engineLinkageREP:Init()
end
Here is my RE2g_cmn.lua file:
Code: Select all
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPA9 - Naboo
-- Common script that shares all setup information
--
ScriptCB_DoFile("setup_teams")
-- Republic Attacking (attacker is always #1)
ALL = 2
IMP = 1
-- These variables do not change
ATT = 1
DEF = 2
function SetupUnits()
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_pilot",
"all_fly_ywing_sc",
"all_inf_engineer",
"all_inf_support",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_infiltrator",
"all_fly_greviousfighter",
"all_fly_arc170fighter_sc",
"all_inf_medic",
"all_fly_gunship_sc",
"all_inf_sniper")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_pilot",
"rep_fly_anakinstarfighter_sc",
"rep_fly_arc170fighter_sc",
"rep_fly_vwing",
"rep_fly_gunship_sc",
"rep_inf_ep3_rifleman")
ReadDataFile("dc:SIDE\\geo.lvl",
"gen_inf_geonosian")
end
SetupTeams{
all = {
team = ALL,
units = 32,
reinforcements = 1000,
pilot = { "all_inf_pilot",4},
marine = { "all_inf_rifleman",4},
},
}
AddUnitClass(ALL,"all_inf_rocketeer", 4)
AddUnitClass(ALL,"all_inf_engineer", 4)
AddUnitClass(ALL,"all_inf_sniper", 4)
AddUnitClass(ALL,"all_inf_support", 4)
AddUnitClass(ALL,"all_inf_medic", 4)
AddUnitClass(ALL,"all_inf_infiltrator", 4)
SetupTeams{
imp = {
team = IMP,
units = 32,
reinforcements = 1000,
pilot = { "rep_inf_ep3_pilot",16},
marine = { "rep_inf_ep3_rifleman",16},
},
}
SetTeamName(3, "locals")
SetUnitCount(3, 14)
AddUnitClass(3, "geo_inf_geonosian", 14)
SetTeamAsFriend(DEF,3)
SetTeamAsFriend(3,DEF)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
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;spa1gcw")
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
SetMemoryPoolSize("Aimer", 190)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 89)
SetMemoryPoolSize("CommandFlyer", 6)
SetMemoryPoolSize("SoldierAnimation", 180)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 66)
SetMemoryPoolSize("EntityLight", 115)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 180)
SetMemoryPoolSize("MountedTurret", 56)
SetMemoryPoolSize("EntityPortableTurret", 20)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 135)
SetMemoryPoolSize("PathNode", 80)
SetMemoryPoolSize("PathFollower", guyCnt)
SetMemoryPoolSize("TreeGridStack", 240)
SetMemoryPoolSize("UnitAgent", 65)
SetMemoryPoolSize("UnitController", 65)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end
ReadDataFile("dc:RE2\\spa_sky.lvl", "end")
ReadDataFile("dc:RE2\\RE2.lvl", myGameMode)
SetDenseEnvironment("false")
SetParticleLODBias(15000)
-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
local voiceQuick = OpenAudioStream("sound\\global.lvl", "imp_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "all_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")
SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)
SetOutOfBoundsVoiceOver(ALL, "allleaving")
SetOutOfBoundsVoiceOver(IMP, "impleaving")
SetAmbientMusic(ALL, 1.0, "all_spa_amb_start", 0,1)
SetAmbientMusic(ALL, 0.99, "all_spa_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.1,"all_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(ALL, "all_spa_amb_victory")
SetDefeatMusic (ALL, "all_spa_amb_defeat")
SetVictoryMusic(IMP, "imp_spa_amb_victory")
SetDefeatMusic (IMP, "imp_spa_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
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
AddCameraShot(-0.049495, 0.003922, -0.995646, -0.078892, 24.992880, -22.995819, -1025.940186);
AddCameraShot(0.546201, 0.047743, 0.833116, -0.072822, 402.610260, -105.474068, -55.044727);
AddCameraShot(0.988295, -0.091070, 0.121873, 0.011230, 33.932011, 10.868500, 1567.624146);
AddCameraShot(-0.380690, 0.021761, -0.922940, -0.052756, 1351.167236, 188.651230, -10.971837);
AddCameraShot(0.941014, -0.051715, 0.333887, 0.018349, 1053.546143, 188.651230, -51.276745);
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")
AddLandingRegion("cis-CP1Con")
AddLandingRegion("rep-CP1Con")
AddLandingRegion("rep-CP2Con")
end
Thank you!! Please help!!
- Majin Revan




