AI wont spawn

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
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

AI wont spawn

Post by Tears2Roses »

Hello. I am nearly done my map, but theres one problem... The AI won't spawn. Originally, the AI from one command post wouldn't follow the paths ( not move at all, run in circles, just not where they needed to go) The hight of the map may have had something to do with it. Anyways I deleted the CP, and a second CP from the CIS. Then, I tried making them invisible controlzones ( to spawn the clones/droids ) but that didn't work. I also made LUA changes and what not. However, now my AI wont spawn! I can spawn, but they wont. However, my local team, the jawa's, spawn PERFECTLY NORMAL. I spent about an hour pointlessly trying to get it to work, but no go. Any idea what I did wrong? This is my LUA. :
Hidden/Spoiler:
[code]function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp1"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}

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

EnableSPHeroRules()

end[/code]
Note I only put the part regarding the CP's. The rest of the LUA shouldn't matter.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: AI wont spawn

Post by Fiodis »

Tears2Roses wrote:Hello. I am nearly done my map, but theres one problem... The AI won't spawn. Originally, the AI from one command post wouldn't follow the paths ( not move at all, run in circles, just not where they needed to go) The hight of the map may have had something to do with it.
Height shouldn't be a problem at all. If it's above the maximum ceiling you can just edit the value in the LUA to raise the ceiling.

Anyway, can you post your error log?
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: AI wont spawn

Post by Tears2Roses »

I didn't think I would get an error log for CP related things :roll: The map doen't crash. I have a whole wackload of sev 2 errors. The only sev 3 errors I have are:
Hidden/Spoiler:
[code]ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to compare two nil values
stack traceback:
(none): in function `ifs_login_EnterInterface'
(none): in function <(none):598>

ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to compare two nil values
stack traceback:
(none): in function `ifs_login_EnterInterface'
(none): in function <(none):598>

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 [/code]
The map works fine. I can see my custom sides, spawn as them, run around, kill the locals. Its just the custom droids/clones won't spawn. These sev 3 errors dont crash my map.

As I said I have a whole wackload of sev 2 errors ( mostly "in vehicle" errors ) but if you want me to post those I can.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: AI wont spawn

Post by Fiodis »

Tears2Roses wrote:I didn't think I would get an error log for CP related things :roll:
What? Why not?

Can you post the rest of your lua? That part looks fine. You mentioned LUA changes; what changes are those?
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: AI wont spawn

Post by Tears2Roses »

Its ok I had to re-name one thing. Works great now.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: AI wont spawn

Post by Fiodis »

Whenever something's not working right, it's always a good idea to double- or even triple-check your work.
Post Reply