Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet Karting    [LBPK] Help!
#1

Help with pathfinders!

Archive: 13 posts


Not sure what I'm doing wrong. I have a wide piece of track with a wall in the center, and obviously I want the IA to choose either the right or the left path, and leave the wall alone. Anyway, all the IA seem to be attracted by the wall LOL beacuse every single one of them always gets stuck in it.

Naturally, the choice seemed to be a pathfinder. I set it to "Obstacle", include rigid connections so that all the materials of the wall that are grouped are included as well in that red thing that covers it -means that object has become an obstacle- and... Ta-da! Nothing happens. At all. Not a single IA seems worried to avoid crashing into the wall. I also tried lethalizing it, but IA doesn't care and crashes and explodes. All of them. Anyone can help?

Here, a picture of what I'm attempting to do.

http://i1240.photobucket.com/albums/gg495/yugnar/8f17125fca902ebc38cef32217b1dc93_zps00fc878b.jpg

You know, I'm getting a bit frustrated with this.
2012-11-19 20:54:00

Author:
yugnar
Posts: 1478


I believe all you need to do is set it to ignore. When I was making a track that had a speacial third lap I had a wall that swung out to block the old path. They kept hitting it until I set it to ignore then they would drive pass it. Hopefully that helps.2012-11-19 22:00:00

Author:
Dfw86
Posts: 138


If what Dfw says doesn't work for you then you could create a spline, set the spline for AI to follow it, and then add racing brains to each kart and tell them to follow splines. I believe that should do the trick 2012-11-20 15:00:00

Author:
amazingflyingpoo
Posts: 1515


but what happens when they reach the end of the spline? do they just stop? or do they continue? and how do they know where to start the spline from if they have already gone past its start point by accident?
i could never get splines to work properly
2012-11-20 15:23:00

Author:
Arastoph
Posts: 216


There is an easier solution. When horizontally shifting the track the two inner lines represent the path the AI will take like 80% of the time. Shift these inner lines to go around the obstacle without shifting the outer lines to keep the overall shape of the track. I used this technique in MNR regularly.2012-11-20 16:41:00

Author:
Manlius10A
Posts: 88


There is an easier solution. When horizontally shifting the track the two inner lines represent the path the AI will take like 80% of the time. Shift these inner lines to go around the obstacle without shifting the outer lines to keep the overall shape of the track. I used this technique in MNR regularly.

Man, we really need more MNR creators in here! Thanks!
2012-11-20 21:00:00

Author:
yugnar
Posts: 1478


There is an easier solution. When horizontally shifting the track the two inner lines represent the path the AI will take like 80% of the time. Shift these inner lines to go around the obstacle without shifting the outer lines to keep the overall shape of the track. I used this technique in MNR regularly.

That is a GREAT solution. Thanks for the info!
2012-11-20 21:16:00

Author:
amazingflyingpoo
Posts: 1515


Man. A little problem. I implemented that technique and ALELUYA now about 2 sackboys drive correctly and to the right of the wall, the thing is, I can't fully make the road get to the right as I would wish to, as it still covers a lot if the wall and that's why all other sackbots are still crashing into it. As I don't really thing you understood me, here, a pic:

http://i1240.photobucket.com/albums/gg495/yugnar/2d2eac25c3f7a1b25ec16af6a5721935_zps2803ad18.jpg

As you can see, the road -even at its maximum modification- still occupies space of the wall. Any recommendation?
2012-11-20 22:26:00

Author:
yugnar
Posts: 1478


Sorry for double post, but I was wondering if I could set the racers to follow a tag (that would leas them to the right point) just as in games like LBPV or LBP2. If so, how can it be made? I guess it uses a kart brain, but haven't messed up with it much. I remember one had a "Go to point" behaviour or something similar. Anyone knows how to use it?

EDIT: Aghhhhhh! Ok, more issues:

1-I tried using the paths after I discovered how to use them. First of all, I saw no results at all. Once I heard Pookachu saying they don't work unless its the online level, but I consider that pretty stupid because of the lack of locked levels. So...
1.1-Another problem with this is that I can't know which players will be IAs or persons, and if I set everybody to set a path, the player won't be able to control his kart.

2-I also tried to use the modify points tool, so that the fence leads only to one of the two sections of the track. After that, I used the erase fence option so that both could still be accessed by the players. Nah, it didn't work as usual. Those IAs are in love with that wall, always crashing against it.

So yeah. I'm becoming a little -really- frustrated with this. I wonder, maybe I should ask for help in a MNR forum? But how similar are the level editors?
2012-11-21 03:46:00

Author:
yugnar
Posts: 1478


You can tell which karts are AI, I managed to in the beta. IIRC I used a player sensor with a tiny range on the spawn point.

And if all else fails, why not just use an actual branch, make it two seperate roads?
2012-11-21 09:32:00

Author:
Rogar
Posts: 2284


You can tell which karts are AI, I managed to in the beta. IIRC I used a player sensor with a tiny range on the spawn point.

And if all else fails, why not just use an actual branch, make it two seperate roads?

Nope, the branches are just to hard to get the way I want them to be, but thanks for the suggestion.
2012-11-21 13:24:00

Author:
yugnar
Posts: 1478


ok last night i had a go at this and what i did was place a pathfinder set to obstacle on the hazard in the middle of the road and then placed two routes of breadcrumbs that guide the A.I down either path to the right or left of that object. Make sure the first section gates of each breadcrumb trail overlap each other and start at least one gate width away from the hazard.
When i tested the track every single A.I kart avoided the hazard and chose either path so i assume it has worked!!!
2012-11-21 13:42:00

Author:
Arastoph
Posts: 216


ok last night i had a go at this and what i did was place a pathfinder set to obstacle on the hazard in the middle of the road and then placed two routes of breadcrumbs that guide the A.I down either path to the right or left of that object. Make sure the first section gates of each breadcrumb trail overlap each other and start at least one gate width away from the hazard.
When i tested the track every single A.I kart avoided the hazard and chose either path so i assume it has worked!!!

Trying it out as soon as I get some time! I did try using breadcrumbs, but only with one path. Some racers would follow it, but maybe if I add both routes with breadcrums it might work!

Also, adding to the list of my failures:
3-I tried aumenting the difficulty of the IA, because I thought that maybe they would be smarter, but nope jeje.
2012-11-21 20:53:00

Author:
yugnar
Posts: 1478


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.