AI refuses to spawn [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
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

AI refuses to spawn [SOLVED]

Post by Darth_Spiderpig »

Hello there

I had long no problem worth to get posted, but now I need your help, guys.

On Geonosis my AI are refusing ton spawn.
I do not know what else to do, I tripple checked CPs and spwan paths in ZE and the CPs in the .lua, but nothing...

here is my lua:
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
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()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}
cp9 = CommandPost:New{name = "cp9"}
cp9 = CommandPost:New{name = "cp10"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)
conquest:AddCommandPost(cp9)
conquest:AddCommandPost(cp10)

conquest:Start()

EnableSPHeroRules()

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

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\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\ABC.lvl;ABCcw")


ReadDataFile("dc:SIDE\\geo.lvl",
"cis_fly_geofighter")

ReadDataFile("dc:SIDE\\snw.lvl",
"snw_inf_wampa",
"cis_ubd")


ReadDataFile("SIDE\\rep.lvl",
"rep_fly_gunship",
"rep_walk_atte")

ReadDataFile("SIDE\\cis.lvl",
"cis_hover_stap",
"cis_hover_aat")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_clone1",
"rep_clone2",
"rep_clone3",
"rep_clone4",
"rep_clone5",
"rep_clone6",
"rep_clone7",
"rep_clone8",
"rep_clone9",
"rep_clone10")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_droid1",
"cis_droid2",
"cis_droid3",
"cis_droid4",
"cis_droid5",
"cis_droid6",
"cis_droid7",
"cis_droid8")

SetupTeams{
rep = {
team = REP,
units = 30,
reinforcements = 150,
soldier = { "rep_clone1",9, 25},
pilot = { "rep_clone2",1, 1},
assault = { "rep_clone3",1, 1},
sniper = { "rep_clone4",1, 1},
marine = { "rep_clone5",1, 1},
engineer = { "rep_clone9",1, 1},
officer = { "rep_clone6",1, 1},
special = { "rep_clone7",1, 1},
mundi = { "rep_clone8",1, 1},
flame = { "rep_clone10",1, 1},

},
cis = {
team = CIS,
units = 30,
reinforcements = 150,
soldier = { "cis_droid1",9, 25},
pilot = { "cis_droid2",1, 4},
assault = { "cis_droid3",1, 4},
sniper = { "cis_droid4",1, 4},
marine = { "cis_droid5",1, 4},
engineer = { "cis_droid6",1, 4},
officer = { "snw_inf_wampa",1, 4},
special = { "cis_droid8",1, 4},
mundi = { "cis_ubd",1, 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(5, 5) -- 3x2 (3 pairs of legs)
local weaponCnt = 240
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("CommandWalker", 5)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 22)
SetMemoryPoolSize("EntityFlyer", 30)
SetMemoryPoolSize("EntityHover", 20)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 20)
SetMemoryPoolSize("EntityWalker", 5)
SetMemoryPoolSize("MountedTurret", 25)
SetMemoryPoolSize("Navigator", 49)
SetMemoryPoolSize("Obstacle", 760)
SetMemoryPoolSize("PathNode", 512)
SetMemoryPoolSize("SoundSpaceRegion", 46)
SetMemoryPoolSize("TreeGridStack", 500)
SetMemoryPoolSize("UnitAgent", 49)
SetMemoryPoolSize("UnitController", 49)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:LPR\\LPR.lvl", "LPR_conquest")
ReadDataFile("dc:LPR\\LPR.lvl", "LPR_conquest")
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", "yav1cw")
OpenAudioStream("sound\\yav.lvl", "yav1cw")
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
[/code]
Help?
Last edited by Darth_Spiderpig on Mon Dec 28, 2009 2:18 pm, edited 1 time in total.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: AI refuses to spawn

Post by AceMastermind »

Darth_Spiderpig wrote:...
cp9 = CommandPost:New{name = "cp9"}
cp9 = CommandPost:New{name = "cp10"}
should be:

Code: Select all

cp9 = CommandPost:New{name = "cp9"}
cp10 = CommandPost:New{name = "cp10"}
When you edit something and the game doesn't work right afterwards then you should always double check for typos.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: AI refuses to spawn

Post by Darth_Spiderpig »

Uh...

D'OH

Thanks Ace
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: AI refuses to spawn

Post by Deviss »

please post log error surely be useful for know what don't work XD
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: AI refuses to spawn

Post by Darth_Spiderpig »

Hmm, the error log is too big to get posted...

here it is for download.

:?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: AI refuses to spawn

Post by Teancum »

Fill those memory pools. That's 1/2 of your problem.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: AI refuses to spawn

Post by Darth_Spiderpig »

Those have been fixed already. :)
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: AI refuses to spawn

Post by Teancum »

Just browsing through the log, here's a list of what should be fixed to either eliminate crashes and/or make your map run smoother. With memory pools I like to add another 20% to the total it asks for. So if it says to raise a memory pool to 200, I set it to 240, that way the map never runs out of what it needs.
Hidden/Spoiler:
Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "Music" is full; raise count to at least 57

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open dc:SIDE\Reb.lvl

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Explosion.cpp(323)
Explosion "cis_fly_geofighter_exp" missing effect "explosion"

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk geo_inf_geonosian in C:\Program Files\LucasArts\Star Wars Battlefront II\GameData\AddOn\LPR\Data\_lvl_pc\SIDE\geo.lvl

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1019)
Unable to find level chunk in dc:SIDE\geo.lvl

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1222)
Attempting to build an object, rep_roofgun10, that does not have an .odf file associated with it

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1222)
Attempting to build an object, rep_roofgun5, that does not have an .odf file associated with it

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1172)
Could not find odf "tur_bldg_chaingun_roof"!

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1222)
Attempting to build an object, rep_roofgun1, that does not have an .odf file associated with it

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

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

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\CommandPost.cpp(498)
Command Post missing control region "cp8_control"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VehicleSpawn.cpp(140)
Vehicle spawn outside command post "cp1" control region

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

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\Team.cpp(884)
Missing a localized team name for this level, level.LPR.local

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

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(3776)
Command Post "cp5" not found

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to perform arithmetic on a nil value
stack traceback:
(none): in function `AddCommandPost'
(none): in function `ScriptPostLoad'

ifs_sideselect_fnEnter(): Map does not support custom era teams
ifs_sideselect_fnEnter(): The award settings file does not exist

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "TreeGridStack" is full; raise count to at least 768
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: AI refuses to spawn

Post by Darth_Spiderpig »

Ok, thanks Tean, I fixed most of them.

But there are still no AI in conquest mode :(
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: AI refuses to spawn

Post by FragMe! »

Just confirming and someone correct me if I am wrong, but if you are adding units beyond the normal predefined ones do they not need the AddUnitClass statement?
From your LUA

SetupTeams{
rep = {
team = REP,
units = 30,
reinforcements = 150,
soldier = { "rep_clone1",9, 25},
pilot = { "rep_clone2",1, 1},
assault = { "rep_clone3",1, 1},
sniper = { "rep_clone4",1, 1},
marine = { "rep_clone5",1, 1},
engineer = { "rep_clone9",1, 1},
officer = { "rep_clone6",1, 1},
special = { "rep_clone7",1, 1},
mundi = { "rep_clone8",1, 1},
flame = { "rep_clone10",1, 1},

},
cis = {
team = CIS,
units = 30,
reinforcements = 150,
soldier = { "cis_droid1",9, 25},
pilot = { "cis_droid2",1, 4},
assault = { "cis_droid3",1, 4},
sniper = { "cis_droid4",1, 4},
marine = { "cis_droid5",1, 4},
engineer = { "cis_droid6",1, 4},
officer = { "snw_inf_wampa",1, 4},
special = { "cis_droid8",1, 4},
mundi = { "cis_ubd",1, 1},
}
}

it might not recognize mundi and flame as units unless you do the AddUnitClass thing.
One thing to try is to either comment out or remove those units and try your map again.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: AI refuses to spawn

Post by Teancum »

AI will only refuse to spawn in a gametype if the gametype is not set up correctly. If you're getting an error like the one below, your CPs aren't set up correctly.
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to perform arithmetic on a nil value
stack traceback:
(none): in function `AddCommandPost'
(none): in function `ScriptPostLoad'
Only concern yourself with the ScriptPostLoad() section. Make sure you have the 100% exact names of each of your CPs (as named in ZeroEdit) in the quotes, as seen in yellow below.
Hidden/Spoiler:
function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}
cp9 = CommandPost:New{name = "cp9"}
cp10 = CommandPost:New{name = "cp10"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)
conquest:AddCommandPost(cp9)
conquest:AddCommandPost(cp10)

conquest:Start()

EnableSPHeroRules()

end
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: AI refuses to spawn

Post by Darth_Spiderpig »

Darth_Spiderpig wrote:it might not recognize mundi and flame as units unless you do the AddUnitClass thing.
Oh, it does. I added "mundi" and "flame" in the setupteams.lua. :wink:

@Tean: I now deleted every CP and replaced it, and guess what?

:runaway: It works :runaway:

Thank you very much, problem solved. :bowdown:
Post Reply