AI completely ignoring barriers...

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
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

AI completely ignoring barriers...

Post by Locutus »

Well, the title says it basically: The AI ignores one of my barriers at all.
Hidden/Spoiler:
Image
I made a conquest map and then I decided to add CTF1 mode.
Everything is working fine but due to the changed cp layout in this mode I needed to change a couple of objects etc.
When I run conquest I've added this line to my lua:

Code: Select all

DisableBarriers("Barrier192") 
and for ctf:

Code: Select all

  BlockPlanningGraphArcs("Connection48")
  BlockPlanningGraphArcs("Connection50")
  BlockPlanningGraphArcs("Connection58")
  BlockPlanningGraphArcs("Connection59")
  BlockPlanningGraphArcs("Connection109")
This is how it looks in the ZE (the red marked barrier is the one ignored):
Hidden/Spoiler:
Image
So in conquest the bots ignore the barrier as they should but in ctf they're totally ignoring it.
I've tried everything that came into my mind, cleaned the munger etc but with no success...

Any idea why or how I can avoid this?
User avatar
Cerfon Rournes
Master Bounty Hunter
Master Bounty Hunter
Posts: 1558
Joined: Thu Jul 08, 2010 5:53 pm
Projects :: WIP. I will reveal what it is later on..
Games I'm Playing :: SWBF2-SWRC
xbox live or psn: No gamertag set
Location: New York, USA
Contact:

Re: AI completely ignoring barriers...

Post by Cerfon Rournes »

Try this.
Just add the barriers you want to be in ctf mode, to the ctf layer. It should work fine.
User avatar
DarthFannel
Private Second Class
Posts: 60
Joined: Tue Jul 20, 2010 9:53 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Mexico City

Re: AI completely ignoring barriers...

Post by DarthFannel »

Cerfon Rournes wrote:Try this.
Just add the barriers you want to be in ctf mode, to the ctf layer. It should work fine.
Unless I am missing something, barriers are present in all layers.
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: AI completely ignoring barriers...

Post by Noobasaurus »

Try putting them in the base layer.
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 completely ignoring barriers...

Post by FragMe! »

DarthFannel wrote:
Cerfon Rournes wrote:Try this.
Just add the barriers you want to be in ctf mode, to the ctf layer. It should work fine.
Unless I am missing something, barriers are present in all layers.
You should be able to have different sets of barriers (and paths for that matter) for different game modes as was mentioned. You just put them into a layer that is associated with that mode, eg conquest, ctf, 1flag. The only time you would need to put them into a lua is if they were all on one common layer (easier if 90% are common and you only want to disable a few)
By the same token if you only want to block AI from going to a certain area in one mode, add just that barrier to that modes layer.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: AI completely ignoring barriers...

Post by Locutus »

Mhhh, I've tried adding barriers to both layers (base and ctf) but with no success. I placed about 5 barriers between the spawnpoints but that didn't help - the AI still gets stuck in the wall.
But the AI is aware of all other barriers (except for 2 solder-only barriers which they ignore when playing ctf (and only in this mode)).
Image
I'm really getting mad about this, my map would be complete if there wasn't just this !X@? barrier...

Any other ideas what I can try except for "redoing base layout"?
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: AI completely ignoring barriers...

Post by CressAlbane »

I've had problems before with the AI ignoring the barriers if the mode is CTF. I think they try to run straight toward the flag, yes? I think it has something to do with the AI trying to get the flag picked up (like if it was dropped behind barriers) I coudln't find a fix though.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: AI completely ignoring barriers...

Post by Locutus »

Nearly.
The bots run to the flag and get it and then they return to their own cp from where're trying to reach the enemy base as it seems to be the shortest route (pic from my last post).
Post Reply