Correct way to use 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
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Correct way to use barriers?

Post by theITfactor »

What exactly is the correct way to use barriers for say, AI locals?

I want to enclose some locals into a rectangular area.

Is it that you make just one and drag it to be like a big cube? Or do you make like 4 into wall type things around the area?
Fiminopter
Sergeant Major
Sergeant Major
Posts: 221
Joined: Sat Apr 29, 2006 11:20 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by Fiminopter »

You've got to make walls.
Cube = bad.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

barrier usage

Post by AceMastermind »

You can use them either way depending on your needs, but if you want to trap the AI within an area, build walls around the area with multiple barriers.
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Post by theITfactor »

AceMastermind wrote:You can use them either way depending on your needs, but if you want to trap the AI within an area, build walls around the area with multiple barriers.
I did that, and at first it worked, but now for some reason they are going right through them? (They fall right into the water below, straight through the barrier all the way across)

Image
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Suggestion for invisible collision objects

Post by AceMastermind »

I can't really tell what's going on in that pic, but planning paths and barriers should make the AI do what you want them to.
If ZE barriers don't seem to work for your situation, you could always add invisible collision objects to "fence" them in or guide them.
Master Fionwë
Rebel Colonel
Rebel Colonel
Posts: 598
Joined: Wed May 30, 2007 3:33 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: At RCTC
Contact:

Post by Master Fionwë »

My flyers completely ignore the barriers I have set up for them. I found out that's part of the reason why the rep loses so much, they have almost no vehicle backup of any sort, while the cis.....
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Fly/Danger Regions

Post by AceMastermind »

Master Fionwë wrote:My flyers completely ignore the barriers I have set up for them.
From the docs:

Fly/Danger Regions
Name Prefix: danger
Parameters: none
Usage: Use any type.
Results: Flyer AI will avoid these regions.
Master Fionwë
Rebel Colonel
Rebel Colonel
Posts: 598
Joined: Wed May 30, 2007 3:33 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: At RCTC
Contact:

Post by Master Fionwë »

Oh, I missed that...
Thanks.
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Post by theITfactor »

AceMastermind wrote:I can't really tell what's going on in that pic, but planning paths and barriers should make the AI do what you want them to.
If ZE barriers don't seem to work for your situation, you could always add invisible collision objects to "fence" them in or guide them.
the AI hate me. The ones in the main part of the map try to capture a cp that is not in the objective or their planning, and the local AI like to jump off cliffs through barriers. :(
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

Have you tried widening the barriers? I know it's supposed to be, in essence, a wall the AI aren't allowed to go through, but sometimes they do it anyway because they take a certain action that leads them through it, like when they dodge an attack. This may not fix it, but it's worth trying. Test it out on one barrier first, and see what the AI do there.

Other than that, I'm out of ideas.

Oh wait...did you update all .bar files? I know I have to copy/paste from my main .bar file into the specific layer's .bar file in my space map to be sure the AI don't ignore the barriers. (Saving in ZE only updates the main .bar file only.) Check into this first.
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Post by theITfactor »

MercuryNoodles wrote:Have you tried widening the barriers? I know it's supposed to be, in essence, a wall the AI aren't allowed to go through, but sometimes they do it anyway because they take a certain action that leads them through it, like when they dodge an attack. This may not fix it, but it's worth trying. Test it out on one barrier first, and see what the AI do there.

Other than that, I'm out of ideas.

Oh wait...did you update all .bar files? I know I have to copy/paste from my main .bar file into the specific layer's .bar file in my space map to be sure the AI don't ignore the barriers. (Saving in ZE only updates the main .bar file only.) Check into this first.
Where is the second .bar file? All I can find is the one in the world1 folder, PWN.bar
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

hmm...I believe it's generated automatically in the same folder (<map>_<layer>.bar, or something like that), so it's possible it's not necessary for you, if the file wasn't created.

That being the case, looking into using wider barriers would be worth trying. It seems as if they react to the presence of the barriers when simply walking around, doing normal pathfinding. It's purely deduction (and I could be wrong) on my part, but it seems you're having problems with the AI doing things like jumping, etc, to get through the barrier. That kind of leads me to wonder if there's anything telling the AI to go in a direction leading through the barriers, like something telling the AI to jump when they reach the edge, since they normally don't pass through without doing something that forces them to move through them. If they're ignoring the barriers entirely, then we're dealing with a whole other animal.
Post Reply