Hidden/Spoiler:
AI stopped spawning [Solved]
Moderator: Moderators
- Oceans14
- Command Sergeant Major

- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
AI stopped spawning [Solved]
Cutting right to the chase, the AI won't spawn in campaign mode in my map. I've set up the spawn path, Cp, etc. In my lua, I set AllowAISpawn(ATT, true) and then I tried (REP, true) as well. I checked to make sure everything was in the correct layer (it is) and now I'm at the point where I have no idea what else could be wrong. I cleaned/manual cleaned too. Here's my relevant lua section if it helps, but I think I covered all the details already...
PS the error log makes no mention of problems with the AI spawning.
Last edited by Oceans14 on Tue Aug 16, 2016 8:07 am, edited 1 time in total.
-
thelegend
- Sith

- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: AI stopped spawning
Mostly AI doesn't spawn if they have no Goal set. That means you need to give them some kind of an AI goal like Deathmatch, Conquest, Capture the Flag, Defend, Destroy...There are a few. I can't remember where to find them still but it is highly important to set up AI goals when making a campaign.
- Oceans14
- Command Sergeant Major

- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: AI stopped spawning
Really? Never heard that before (I don't doubt you though, it makes sense). I have the goals all set up and commented out since I figured it would make sense to get them spawning first, lol. I'll update my script and see what happens.thelegend wrote:Mostly AI doesn't spawn if they have no Goal set. That means you need to give them some kind of an AI goal like Deathmatch, Conquest, Capture the Flag, Defend, Destroy...There are a few. I can't remember where to find them still but it is highly important to set up AI goals when making a campaign.
-
thelegend
- Sith

- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: AI stopped spawning
Some might say this is a pretty unnecessary step, but you might want to keep the Deathmatch Goal and when you are satisfied, clear their goals using ClearAIGoals. Like through a timer or by an objective. It's up to you. Or maybe first ClearAIGoals, then their real goal...but if you just want to have them spawned use any goal then clear the goals. The AI will remain but will probably stand there until they receive their next goal.
- Oceans14
- Command Sergeant Major

- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: AI stopped spawning
Adding a goal did it, thanks thelegend! I noticed a line in the goto objective called AIGoalWeight that is set to 0 by default. Does this do exactly what it seems and make the AI do the same thing as the player? I gave it a value in relation to the other goal weight and they didn't seem to care.
-
thelegend
- Sith

- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: AI stopped spawning [Solved]
I think the goal weight is the percentage of AI doing this goal. Like AIGoal Deathmatch is set to 50 and Destroy to 50. Half the AI will target..a target to destroy and the other half will continue killing the enemy bots. But sometimes there is even 500 or 1000. I am not 100% sure about this but it's definitely the weight for AI bots to do certain things like mentioned above.
- Oceans14
- Command Sergeant Major

- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: AI stopped spawning [Solved]
Right, right. I have a deathmatch and defend goal set at the moment with slightly different weights. What I meant was since my objective as the player is to go to "point A", can I use the embedded setting in the objective to send the AI there too?thelegend wrote:I think the goal weight is the percentage of AI doing this goal. Like AIGoal Deathmatch is set to 50 and Destroy to 50. Half the AI will target..a target to destroy and the other half will continue killing the enemy bots. But sometimes there is even 500 or 1000. I am not 100% sure about this but it's definitely the weight for AI bots to do certain things like mentioned above.
Code: Select all
--OBJECTIVE 1: Get to the base of the cliff
Objective1 = ObjectiveGoto:New{TeamATT = ATT, TeamDEF = DEF,
text = "level.abc.objectives.short.2", popupText = "level.abc.objectives.long.2",
regionName = "cliff_face", mapIcon = "hud_objective_icon_circle", AIGoalWeight=75}
