Page 1 of 1

Campaign Issues with Locals [Solved]

Posted: Sat Jul 07, 2012 11:00 pm
by yuke5
Hey guys. I started working on a campaign for my mod map. Everything was going swimmingly, I had a couple of objectives, they worked out, and A.I. from both teams were spawning. Then I tried to make the Republic side consist of one protagonist unit and have a local "Republic" side aid him. However, although the defending A.I. spawn just fine, and the player can spawn just fine, the locals don't spawn at all. Can I get some help please?

What I have done:

- Quintuple check my com_invisible_controlzone had the correct spawn path name

-Cleaned my world data, and then re-munge

-Tried renaming the command post and spawn path to see if it would have any effect

My LUA:
Hidden/Spoiler:
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("ObjectiveAssault")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_DoFile("ObjectiveCTF")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("Ambush")
ScriptCB_DoFile("setup_teams")

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



function ScriptPostLoad()

SetAIDifficulty(2, -8, "medium")
AllowAISpawn(3, true)
AllowAISpawn(DEF, false)
ScriptCB_SetGameRules("campaign")

onfirstspawn = OnCharacterSpawn(
function(character)
if character == 0 then
ShowPopup("level.geo1.hints.hints")
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
BeginObjectivesTimer()
ScriptCB_EnableCommandPostVO(0)
ShowMessageText("ifs.mission.Start", ATT)

end
end)


--Get Into Posistion
Objective1 = ObjectiveGoto:New{TeamATT = ATT, TeamDEF = DEF,
text = "ifs.mission.prepare", popupText = "ifs.mission.first",
regionName = "goto", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}

Objective1:AddHint("level.geo1.hints.movement")
Objective1:AddHint("level.geo1.hints.obj_markers")
Objective1:AddHint("level.geo1.hints.review_objectives")
Objective1:AddHint("level.geo1.hints.sprint")


Objective1.OnStart = function(self)
att_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
def_obj1_aigoal = AddAIGoal(DEF, "Deathmatch", 100)

end

Objective1.OnComplete = function(self)
DeleteAIGoal(att_obj1_aigoal)
DeleteAIGoal(def_obj1_aigoal)
ShowMessageText("game.objectives.complete", ATT)

end









--Assault the Diner
Objective2CP = CommandPost:New{name = "cp_diner"}
Objective2 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "ifs.mission.diner2", popupText = "ifs.mission.diner", AIGoalWeight = 0}
Objective2:AddCommandPost(Objective2CP)

Objective2:AddHint("level.geo1.hints.capture_cp")

Objective2.OnStart = function(self)
AICanCaptureCP("cp_diner", ATT, false)
AICanCaptureCP("cp_diner", DEF, true)
att_obj2_aigoal = AddAIGoal(ATT, "Defend", 50, "cp_diner")
def_obj2_aigoal = AddAIGoal(DEF, "Defend", 50, "cp_diner")
att_obj2_aigoal2 = AddAIGoal(ATT, "Deathmatch", 100)
def_obj2_aigoal2 = AddAIGoal(DEF, "Deathmatch", 100)
AllowAISpawn(ATT, true)
AllowAISpawn(DEF, true)
end

Objective2.OnComplete = function(self)
ShowMessageText("game.objectives.complete", ATT)
DeleteAIGoal(att_obj2_aigoal)
DeleteAIGoal(att_obj2_aigoal2)
DeleteAIGoal(def_obj2_aigoal)
DeleteAIGoal(def_obj2_aigoal2)
SetProperty("cp_diner", "Team", 1)
SetProperty("cp_diner", "CaptureRegion", "")

end




--Assault the club
Objective3CP = CommandPost:New{name = "cp_club"}
Objective3 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "ifs.mission.second_text", popupText = "ifs.mission.second", AIGoalWeight = 0}
Objective3:AddCommandPost(Objective3CP)

Objective3:AddHint("level.geo1.hints.capture_cp")

Objective3.OnStart = function(self)
AICanCaptureCP("cp_club", ATT, false)
AICanCaptureCP("cp_club", DEF, true)
att_obj3_aigoal = AddAIGoal(ATT, "Defend", 50, "cp_club")
def_obj3_aigoal = AddAIGoal(DEF, "Defend", 50, "cp_club")
att_obj3_aigoal2 = AddAIGoal(ATT, "Deathmatch", 100)
def_obj3_aigoal2 = AddAIGoal(DEF, "Deathmatch", 100)
OBJ3_ReinforcementCount = GetReinforcementCount(ATT)
SetReinforcementCount(ATT, OBJ3_ReinforcementCount + 1)
end

Objective3.OnComplete = function(self)
ShowMessageText("game.objectives.complete", ATT)
DeleteAIGoal(att_obj3_aigoal)
DeleteAIGoal(att_obj3_aigoal2)
DeleteAIGoal(def_obj3_aigoal)
DeleteAIGoal(def_obj3_aigoal2)
SetProperty("cp_club", "Team", 1)
SetProperty("cp_club", "CaptureRegion", "")

end






end



function BeginObjectivesTimer()
beginobjectivestimer = CreateTimer("beginobjectivestimer")
OnTimerElapse(BeginObjectives, beginobjectivestimer)
SetTimerValue(beginobjectivestimer, 3)
StartTimer(beginobjectivestimer)
end

function BeginObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 4}
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:AddObjectiveSet(Objective2)
objectiveSequence:AddObjectiveSet(Objective3)

objectiveSequence:Start()

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

ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(80)
SetMaxPlayerFlyHeight (80)

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::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
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\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hover_barcspeeder",
"rep_inf_spade")
ReadDataFile("dc:SIDE\\civ.lvl",
"civ_inf_aqualish",
"civ_inf_sniper",
"civ_inf_engineer")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")

SetupTeams{
rep = {
team = REP,
units = 1,
reinforcements = 5,
soldier = { "rep_inf_spade",0, 1},

},
cis = {
team = CIS,
units = 20,
reinforcements = -1,
soldier = { "civ_inf_aqualish",9, 20},
sniper = {"civ_inf_sniper",1, 4},
engineer = { "civ_inf_engineer",1, 4},

}


}

SetTeamName (3, "Clone")
AddUnitClass (3, "rep_inf_ep3_rifleman", 1, 6)
SetUnitCount (0, 6)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)
SetReinforcementCount(3, -1)


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- 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("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:CRS\\CRS.lvl", "CRS_conquest")
ReadDataFile("dc:CRS\\CRS.lvl", "CRS_campaign")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end
The local's cp name is "cp8"

The spawnpath is called "repspawn"

I have made absolutely sure that the name lines up, but I'll post photos of zeroeditor so you can see for yourself.
Hidden/Spoiler:
ImageImage
Finally, here is my Bfront2 log.
Hidden/Spoiler:
Opened logfile BFront2.log 2012-07-07 2249
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy english 0
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: No custom_gc_5.lvl
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: No custom_gc_10.lvl
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_GetGCButtonList()
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
addme.lua too old: read version 4.0; expected at least 5.0
Cannot find ..\..\addon\BFX\data\_LVL_PC\mission.lvl. Skipping BFX's extra missions
Found ..\..\addon\BDT\data\_LVL_PC\SIDE\dark.lvl. Adding DT's missions
MAP: Tatooine: Outpost (TJW): Searching for 153rd Legion and Extension (153, X15)
MAP: Tatooine: Outpost (TJW): Cannot find 153rd Legion (153) installed on this system.
MAP: Tatooine: Outpost (TJW): Searching for Star Wars: The Clone Wars and Extension (TCW)
MAP: Tatooine: Outpost (TJW): Cannot find Star Wars: The Clone Wars (TCW) installed on this system.
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_sp_campaign: Input_Accept(): Entered: _tab_instant
missionlist_ExpandMapList()
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
this.CurButton = check_mode6
cur_button = nil
Checkbox for check_era3 clicked
this.CurButton = check_era3
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 061812AC
The key, value is: mode_eli_c 1
The key, value is: blue 100
The key, value is: mode_con_c 1
The key, value is: isModLevel 1
The key, value is: bSelected 1
The key, value is: mode_con_1 1
The key, value is: change table: 061812CC
The key, value is: era_c 1
The key, value is: era_1 1
The key, value is: mode_hunt_c 1
The key, value is: mode_con_g 1
The key, value is: era_g 1
The key is mapluafile, the formated value is: CRS<A>_<B>
custom_printTable(): Returning
custom_printTable(): table: 0618672C
The key, value is: key mode_con
The key, value is: subst con
The key, value is: showstr modename.name.con
The key, value is: descstr modename.description.con
The key, value is: icon mode_icon_con
custom_printTable(): Returning
gMapEras.key = era_c Era = era_c subst = c
Adding map: CRSc_eli idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture btn_directional_pad_LR
game_interface: Entered
utility_functions2: Listening on AddUnitClass() calls
utility_functions2: Listening on SetHeroClass() calls
utility_functions2: Listening on ReadDataFile() calls
game_interface: Reading in custom strings
game_interface: No user_script_0.lvl
game_interface: No user_script_1.lvl
game_interface: No user_script_2.lvl
game_interface: No user_script_3.lvl
game_interface: No user_script_4.lvl
game_interface: No user_script_5.lvl
game_interface: No user_script_6.lvl
game_interface: No user_script_7.lvl
game_interface: No user_script_8.lvl
game_interface: No user_script_9.lvl
game_interface: Found user_script_10.lvl
user_script_10: Entered
user_script_10: Replacing v1.3 (r117)'s AddUnitClass as it should've had a return value. This fixes the Leia bug.
user_script_10: No user_script_11.lvl. Will stop searching for any more user scripts.
user_script_10: Exited
ifs_sideselect_fnBuildScreen()
game_interface: Exited

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(317)
Memory pool "ClothData" set item count after being allocated

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (rep1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1058)
Entity "com_weap_veh_guided_rocket_ord" unknown terrain collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_veh_guided_rocket_ord" unknown vehicle collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_veh_guided_rocket_ord" unknown building collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1051)
Entity "com_weap_veh_guided_rocket_ord" unknown targetable collision "CollisionMesh"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1058)
Entity "com_weap_award_rocket_launcher_" unknown terrain collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_award_rocket_launcher_" unknown vehicle collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_award_rocket_launcher_" unknown building collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1051)
Entity "com_weap_award_rocket_launcher_" unknown targetable collision "CollisionMesh"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(10471)
Soldier rep_inf_capetrooper has geometry collision

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(2076)
Weapon "rep_weap_inf_dc15a" missing high res geometry "rep_weap_dc15rifle1"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(10471)
Soldier spade has geometry collision

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(10471)
Soldier all_inf_aqualish has geometry collision

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(10471)
Soldier ig88 has geometry collision

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Ordnance.cpp(498)
Ordnance "com_weap_inf_pistol_ord_heavy" missing impact explosion "com_weap_inf_commando_pistol_exp"

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(2076)
Weapon "all_weap_inf_fusioncutter" missing high res geometry "all_1st_weap_inf_fusioncutter"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (all1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"
uf_updateClassIndex(): Added class: rep_inf_spade
uf_updateClassIndex(): Added class: civ_inf_aqualish
uf_updateClassIndex(): Added class: civ_inf_sniper
uf_updateClassIndex(): Added class: civ_inf_engineer
uf_updateClassIndex(): Added class: rep_inf_ep3_rifleman
utility_functions2: ReadDataFile(): This map's code, mode: crs crs_campaign

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\SkyManager.cpp(122)
Skyfile FarSceneRange is in old format

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\StringDB.cpp(48)
ID=e79fea8a: trying to replace "civ_fly_awing" with "civ_fly_awing2"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\CommandPost.cpp(476)
Label "level.CRS.cp8" not localized

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 4

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 8

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 12

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 16

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 20

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 24

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 28

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 32

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 36

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 40

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 44

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 48

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 52

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 56

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 60

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 64

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 68

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 72

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 76

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 80

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 84

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 88

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 92

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 96

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 100

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 104

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 108

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 112

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 116

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 120

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 124

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 128

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 132

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 136

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 140

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 144

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 148

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 152

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 156

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 160

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 164

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 168

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 172

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 176

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 180

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 184

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(439)
level.CRS.locals not localized

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'rep_weap_inf_dc15a' is not localized for stats page

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(2264)
ShowPopup() has been depricated. Please remove all references to it in code

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(2523)
Timer "victoryTimer" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(2523)
Timer "delayTimer" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(2523)
Timer "dittyTimer" not found
release self.dittyTimerResponse

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'civ_weap_inf_falaan' is not localized for stats page

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'civ_weap_inf_pistol' is not localized for stats page

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'civ_weap_inf_rifle' is not localized for stats page

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(82)
Weapon 'civ_weap_inf_pistol_heavy' is not localized for stats page


I think the error is probably in the LUA, but I don't what it is and how to fix it. Help would be greatly appreciated. Thanks in advance!

Re: Campaign Issues with Locals

Posted: Sat Jul 07, 2012 11:17 pm
by AQT
You currently have in your lua:

Code: Select all

SetUnitCount (0, 6)
It should be:

Code: Select all

SetUnitCount (3, 6)
Since the first value refers to the team number. :wink:

Re: Campaign Issues with Locals

Posted: Sat Jul 07, 2012 11:50 pm
by yuke5
D'OH! I thought it referenced minimum unit count. I'll change it and see if it works then. Hopefully there are no other issues. Thanks, AQT.

EDIT: Nope, local A.I. still aren't spawning.

Re: Campaign Issues with Locals

Posted: Sat Jul 07, 2012 11:51 pm
by ARCTroopaNate
:o

Same Juke! I've been having this problem for over a year! Thanks AQT! I must try this!

Re: Campaign Issues with Locals

Posted: Sat Jul 07, 2012 11:51 pm
by kinetosimpetus
Do they have an AI Goal?

Re: Campaign Issues with Locals

Posted: Sat Jul 07, 2012 11:58 pm
by yuke5
kinetosimpetus wrote:Do they have an AI Goal?
No. I'll add one and see if it works.

EDIT: Nope. :|

EDIT2: Gone through, re did the command post, made a new path. Nothing. I am screwing something up, but what is it?

EDIT3: I have also revised my LUA, to mention the enabling spawning for team 3, but instead for the ATT team. I'm relatively sure that if ATT units can spawn, than so can units friendly to the ATT team. I may be wrong though. At this point I have been trying so many things it's hard to keep track.

EDIT:4 Did some research with stock assets and noticed something I hadn't before. I am going to very carefully go through and add A.I. goals for everything for team 3. This may yield results. Maybe.

Re: Campaign Issues with Locals

Posted: Sun Jul 08, 2012 12:37 am
by AQT
The following line is unnecessary:

Code: Select all

SetReinforcementCount(3, -1)
They should automatically have infinite reinforcements without it.
yuke5 wrote:I have also revised my LUA, to mention the enabling spawning for team 3, but instead for the ATT team. I'm relatively sure that if ATT units can spawn, than so can units friendly to the ATT team.
What are you saying here? Are you referring to the AllyPath? This allows allied units not on the same team to spawn at the same CP.
Did some research with stock assets and noticed something I hadn't before. I am going to very carefully go through and add A.I. goals for everything for team 3.
You only need to do this if you want to change team 3's goals after every objective.

Re: Campaign Issues with Locals

Posted: Sun Jul 08, 2012 12:41 am
by yuke5
I actually just got it working! I came back here to let you guys know, and then I saw AQT's post, and I'm thinking "Wow, that would've helped." But yeah, I do want A.I. objectives to change with each objective. I've been trying to solve this problem all day actually. Now, finally at 12:45 AM the problem has finally been vanquished. Thanks a bunch AQT, and kino!

Here is my functional LUA, in case anyone is interested:
Hidden/Spoiler:
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("ObjectiveAssault")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_DoFile("ObjectiveCTF")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("Ambush")
ScriptCB_DoFile("setup_teams")

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

Clone = 3




function ScriptPostLoad()

SetAIDifficulty(2, -8, "medium")
AllowAISpawn(ATT, true)
AllowAISpawn(DEF, false)
AllowAISpawn(Clone, true)
ScriptCB_SetGameRules("campaign")


AddAIGoal(Clone, "Deathmatch", 100)


onfirstspawn = OnCharacterSpawn(
function(character)
if character == 0 then
ShowPopup("level.geo1.hints.hints")
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
BeginObjectivesTimer()
ScriptCB_EnableCommandPostVO(0)
ShowMessageText("ifs.mission.Start", ATT)

end
end)


--Get Into Posistion
Objective1 = ObjectiveGoto:New{TeamATT = ATT, TeamDEF = DEF,
text = "ifs.mission.prepare", popupText = "ifs.mission.first",
regionName = "goto", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}

Objective1:AddHint("level.geo1.hints.movement")
Objective1:AddHint("level.geo1.hints.obj_markers")
Objective1:AddHint("level.geo1.hints.review_objectives")
Objective1:AddHint("level.geo1.hints.sprint")


Objective1.OnStart = function(self)
att_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
def_obj1_aigoal = AddAIGoal(DEF, "Deathmatch", 100)
con_obj_aigoal = AddAIGoal(Clone, "Deathmatch", 100)


end

Objective1.OnComplete = function(self)
DeleteAIGoal(att_obj1_aigoal)
DeleteAIGoal(def_obj1_aigoal)
DeleteAIGoal(con_obj1_aigoal)
ShowMessageText("game.objectives.complete", ATT)

end









--Assault the Diner
Objective2CP = CommandPost:New{name = "cp_diner"}
Objective2 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "ifs.mission.diner2", popupText = "ifs.mission.diner", AIGoalWeight = 0}
Objective2:AddCommandPost(Objective2CP)

Objective2:AddHint("level.geo1.hints.capture_cp")

Objective2.OnStart = function(self)
AICanCaptureCP("cp_diner", ATT, false)
AICanCaptureCP("cp_diner", DEF, true)
AICanCaptureCP("cp_diner", Clone, false)
att_obj2_aigoal = AddAIGoal(ATT, "Defend", 50, "cp_diner")
def_obj2_aigoal = AddAIGoal(DEF, "Defend", 50, "cp_diner")
con_obj2_aigoal = AddAIGoal(Clone, "Defend", 50, "cp_diner")
att_obj2_aigoal2 = AddAIGoal(ATT, "Deathmatch", 100)
def_obj2_aigoal2 = AddAIGoal(DEF, "Deathmatch", 100)
con_obj2_aigoal2 = AddAIGoal(Clone, "Deathmatch", 100)
AllowAISpawn(ATT, true)
AllowAISpawn(DEF, true)
AllowAISpawn(Clone, true)
end

Objective2.OnComplete = function(self)
ShowMessageText("game.objectives.complete", ATT)
DeleteAIGoal(att_obj2_aigoal)
DeleteAIGoal(att_obj2_aigoal2)
DeleteAIGoal(def_obj2_aigoal)
DeleteAIGoal(def_obj2_aigoal2)
DeleteAIGoal(con_obj2_aigoal)
DeleteAIGoal(com_obj2_aigoal2)
SetProperty("cp_diner", "Team", 1)
SetProperty("cp_diner", "CaptureRegion", "")

end




--Assault the club
Objective3CP = CommandPost:New{name = "cp_club"}
Objective3 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "ifs.mission.second_text", popupText = "ifs.mission.second", AIGoalWeight = 0}
Objective3:AddCommandPost(Objective3CP)

Objective3:AddHint("level.geo1.hints.capture_cp")

Objective3.OnStart = function(self)
AICanCaptureCP("cp_club", ATT, false)
AICanCaptureCP("cp_club", DEF, true)
AICanCaptureCP("cp_club", Clone, false)
att_obj3_aigoal = AddAIGoal(ATT, "Defend", 50, "cp_club")
def_obj3_aigoal = AddAIGoal(DEF, "Defend", 50, "cp_club")
con_obj3_aigoal = AddAIGoal(Clone, "Defend", 50, "cp_club")
att_obj3_aigoal2 = AddAIGoal(ATT, "Deathmatch", 100)
con_obj3_aigoal2 = AddAIGoal(Clone, "Deathmatch", 100)
def_obj3_aigoal2 = AddAIGoal(DEF, "Deathmatch", 100)
OBJ3_ReinforcementCount = GetReinforcementCount(ATT)
SetReinforcementCount(ATT, OBJ3_ReinforcementCount + 1)
end

Objective3.OnComplete = function(self)
ShowMessageText("game.objectives.complete", ATT)
DeleteAIGoal(att_obj3_aigoal)
DeleteAIGoal(att_obj3_aigoal2)
DeleteAIGoal(def_obj3_aigoal)
DeleteAIGoal(def_obj3_aigoal2)
DeleteAIGoal(con_obj3_aigoal)
DeleteAIGoal(con_obj3_aigoal2)
SetProperty("cp_club", "Team", 1)
SetProperty("cp_club", "CaptureRegion", "")

end






end



function BeginObjectivesTimer()
beginobjectivestimer = CreateTimer("beginobjectivestimer")
OnTimerElapse(BeginObjectives, beginobjectivestimer)
SetTimerValue(beginobjectivestimer, 3)
StartTimer(beginobjectivestimer)
end

function BeginObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 4}
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:AddObjectiveSet(Objective2)
objectiveSequence:AddObjectiveSet(Objective3)

objectiveSequence:Start()

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

ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(80)
SetMaxPlayerFlyHeight (80)

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::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
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\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hover_barcspeeder",
"rep_inf_spade")
ReadDataFile("dc:SIDE\\civ.lvl",
"civ_inf_aqualish",
"civ_inf_sniper",
"civ_inf_engineer")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")

SetupTeams{
rep = {
team = REP,
units = 1,
reinforcements = 5,
soldier = { "rep_inf_spade",0, 1},

},
cis = {
team = CIS,
units = 20,
reinforcements = -1,
soldier = { "civ_inf_aqualish",9, 20},
sniper = {"civ_inf_sniper",1, 4},
engineer = { "civ_inf_engineer",1, 4},

}


}

SetTeamName (3, "Clone")
AddUnitClass (3, "rep_inf_ep3_rifleman", 1, 6)
SetUnitCount (3, 5)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(3,ATT)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)
SetReinforcementCount(3, -1)


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- 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("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:CRS\\CRS.lvl", "CRS_conquest")
ReadDataFile("dc:CRS\\CRS.lvl", "CRS_campaign")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")

SetAttackingTeam(ATT)


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end