Page 1 of 1

AI wont spawn

Posted: Wed Aug 24, 2011 10:31 am
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.

Re: AI wont spawn

Posted: Wed Aug 24, 2011 10:34 am
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?

Re: AI wont spawn

Posted: Wed Aug 24, 2011 11:53 am
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.

Re: AI wont spawn

Posted: Wed Aug 24, 2011 12:07 pm
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?

Re: AI wont spawn

Posted: Wed Aug 24, 2011 12:27 pm
by Tears2Roses
Its ok I had to re-name one thing. Works great now.

Re: AI wont spawn

Posted: Wed Aug 24, 2011 1:31 pm
by Fiodis
Whenever something's not working right, it's always a good idea to double- or even triple-check your work.