Bots gathering in map center [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
Tempo
Recruit Womprat Killer
Posts: 12
Joined: Mon Jan 04, 2021 10:22 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Bots gathering in map center [Solved]

Post by Tempo »

I'm making a mission that's similar to elimination but I'm basing it off of conquest. I removed all the cp capture zones, and whenever the AI doesn't see anyone to kill they just gather at the center of the map. I've tried putting this after "conquest:Start":

AddAIGoal(1,"Deathmatch",100)
AddAIGoal(2,"Deathmatch",100)

and also this:

self.AIGoals = {}
if self.AIGoalWeight > 0.0 then
table.insert(self.AIGoals, AddAIGoal(self.teamATT, "Deathmatch", 100*self.AIGoalWeight))
table.insert(self.AIGoals, AddAIGoal(self.teamDEF, "Deathmatch", 100*self.AIGoalWeight))
end

but they don't seem to do anything. How can I get them to wander, or really just do anything that doesn't look stupid?
Last edited by Tempo on Fri Mar 26, 2021 6:06 pm, edited 2 times in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Bots gathering in map center.

Post by AQT »

If you are using a conquest lua as a base, you should clear the AI goals first before giving them a Deathmatch one.
Tempo
Recruit Womprat Killer
Posts: 12
Joined: Mon Jan 04, 2021 10:22 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Bots gathering in map center.

Post by Tempo »

how do I do that? I assumed that's what "self.AIGoals = {}" did
User avatar
Benoz
Corporal
Corporal
Posts: 140
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Re: Bots gathering in map center.

Post by Benoz »

You can do that with ClearAIGoals(teamIndex) which clears all previous AI Goals.
Tempo
Recruit Womprat Killer
Posts: 12
Joined: Mon Jan 04, 2021 10:22 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Bots gathering in map center.

Post by Tempo »

that worked, thanks
Post Reply