1Flag rest of team not spawning *SOLVED*

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Spacerocker

1Flag rest of team not spawning *SOLVED*

Post by Spacerocker »

This is what's casuing it but I dont what it's telling me to do in order to fix it.

Code: Select all

Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: table index is nil
stack traceback:
	(none): in function `SoundEvent_SetupTeams'
	(none): in function `ScriptPostLoad'
It says this, yet `SoundEvent_SetupTeams' and `ScriptPostLoad' look correct to me in the LUA.
Hidden/Spoiler:
[code]
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
Conquest = ScriptCB_DoFile("ObjectiveOneFlagCTF")
ScriptCB_DoFile("setup_teams")


-- REP Attacking (attacker is always #1)
IMP = 1;
ALL = 2;
-- These variables do not change
ATT = IMP;
DEF = ALL;


function ScriptPostLoad()

SoundEvent_SetupTeams( REP, 'rep', CIS, 'cis' )

ctf = ObjectiveOneFlagCTF:New{teamATT = IMP, teamDEF = ALL,
textATT = "game.modes.1flag", textDEF = "game.modes.1flag2",
captureLimit = 5, flag = "flag", flagIcon = "flag_icon",
flagIconScale = 3.0, homeRegion = "homeregion",
captureRegionATT = "team1_capture", captureRegionDEF = "team2_capture",
capRegionMarkerATT = "hud_objective_icon_circle", capRegionMarkerDEF = "hud_objective_icon_circle",
capRegionMarkerScaleATT = 3.0, capRegionMarkerScaleDEF = 3.0, multiplayerRules = true}

ctf:Start()

EnableSPHeroRules()

---------------------
---Simple Elevator---
---------------------

--r1 and r2 are regions for the simple elevator.
--r1 moves the elevator up when a human enters it.
--r2 moves the elevator down when a human enters it.

ActivateRegion("r1")
ActivateRegion("r2")

region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then

ShowMessageText( "message.elevator.simple.up", DEF/ATT)

--make sure r2 isn't using the elevator object.
PauseAnimation("Elevator2")

--move the elevator up, making sure it starts from the bottom.
RewindAnimation("elevator1")
PlayAnimation("elevator1")
end
end,
"r1"
)

region2 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then

ShowMessageText( "message.elevator.simple.down", ATT/DEF)

--make sure r1 isn't using the elevator object.
PauseAnimation("elevator1")

--move the elevator down, making sure it starts from the top.
RewindAnimation("Elevator2")
PlayAnimation("Elevator2")
end
end,
"r2"
)

---------------------
---Simple Elevator---
---------------------

--r3 and r4 are regions for the simple elevator.
--r3 moves the elevator up when a human enters it.
--r4 moves the elevator down when a human enters it.

ActivateRegion("r3")
ActivateRegion("r4")

region3 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then

ShowMessageText( "message.elevator.simple.up", ATT/DEF)

--make sure r2 isn't using the elevator object.
PauseAnimation("elevator4")

--move the elevator up, making sure it starts from the bottom.
RewindAnimation("elevator3")
PlayAnimation("elevator3")
end
end,
"r3"
)

region4 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then

ShowMessageText( "message.elevator.simple.down", DEF/ATT)

--make sure r1 isn't using the elevator object.
PauseAnimation("elevator3")

--move the elevator down, making sure it starts from the top.
RewindAnimation("elevator4")
PlayAnimation("elevator4")
end
end,
"r4"
)

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()

--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")



SetMaxFlyHeight(400)
SetMaxPlayerFlyHeight(400)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::Smyge
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::Smyge
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\myg.lvl;myg1gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_fly_moncalamari_DOME",
"all_hero_hansolo_tat")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_fly_destroyer_dome")

SetupTeams{
all = {
team = ALL,
units = 100,
reinforcements = 500,
soldier = { "all_inf_rifleman",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},

},
imp = {
team = IMP,
units = 100,
reinforcements = 500,
soldier = { "imp_inf_rifleman",9, 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(ALL, "all_hero_hansolo_tat")
SetHeroClass(IMP, "imp_hero_bobafett")

-- Level Smygs
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("SoldierAnimation", 200)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 18)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 4)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("FlagItem", 1)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:BRI\\BRI.lvl", "BRI_1flag")
SetDenseEnvironment("false")


-- Sound Smygs

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_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("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\myg.lvl", "myg1")
OpenAudioStream("sound\\myg.lvl", "myg1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

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(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_myg_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_myg_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_myg_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_myg_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_myg_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_myg_amb_end", 2,1)

SetVictoryMusic(ALL, "all_myg_amb_victory")
SetDefeatMusic (ALL, "all_myg_amb_defeat")
SetVictoryMusic(IMP, "imp_myg_amb_victory")
SetDefeatMusic (IMP, "imp_myg_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 Smygs
AddCameraShot(0.700415, -0.058640, 0.708843, 0.059345, 44.444191, 257.470276, -41.101368);
AddCameraShot(0.875298, 0.093395, 0.471802, -0.050341, 394.156921, 174.754578, -20.464598);
AddCameraShot(-0.490513, -0.024925, -0.869955, 0.044207, 115.146332, 172.195251, -43.934128);
AddCameraShot(0.679615, 0.129049, 0.709452, -0.134715, 33.981129, 172.078949, -40.431133);
AddCameraShot(0.851499, -0.190776, -0.476605, -0.106782, -102.357536, 186.228851, -293.782898);
AddCameraShot(0.503895, -0.038258, -0.860441, -0.065328, -350.357880, 186.228851, -103.693756);
AddCameraShot(0.532058, -0.142525, 0.806202, 0.215961, -429.998718, 181.706284, -54.150703);
AddCameraShot(0.535519, -0.467387, -0.529945, -0.462522, -75.905731, 549.974670, -46.020210);
AddCameraShot(0.988163, 0.041263, 0.147625, -0.006164, 283.827362, 203.402008, 341.337067);
AddCameraShot(0.836060, -0.111513, -0.532471, -0.071020, 131.403412, 175.098114, -37.101124);

AddDeathRegion("deathregion")
AddDeathRegion("deathregion01")
AddDeathRegion("deathregion02")
end
[/code]

Edit: Gah! How did I miss that? Ok, I am officially an idiot.
Last edited by Spacerocker on Sun Jan 07, 2007 4:21 pm, edited 1 time in total.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

RE: 1Flag rest of team not spawning

Post by FragMe! »

Change this
SoundEvent_SetupTeams( REP, 'rep', CIS, 'cis' )
to SoundEvent_SetupTeams(IMP, 'imp', ALL, 'all')

that is one error for sure
Post Reply