PDA

View Full Version : question about .pth files


DarthStoney
07-13-2007, 07:43 AM
I was wondering if it is possible to create path files and have them work.
the reason for asking is that in working with the droid modules I was trying
to make an NPC move to a waypoint that goes around corners and do to the
lack of path files in the modules he tries to make a straight line to the waypoint through walls.

Pavlos
07-14-2007, 01:55 PM
I was wondering if it is possible to create path files and have them work.
the reason for asking is that in working with the droid modules I was trying
to make an NPC move to a waypoint that goes around corners and do to the
lack of path files in the modules he tries to make a straight line to the waypoint through walls.

Back when I was working on M4-78RP, I asked a similar question. stoffe managed to come up with a theory (http://www.lucasforums.com/showpost.php?p=2107405&postcount=3) that should work. However, my tests were unsuccessful but I have a feeling that may be to do with me making a mistake - which seems understandable when one considers the labyrinthine nature of the .pth files.

But to be honest with you, you're probably best simply setting up a series of waypoints and getting the creature to walk to each of them in turn - it's much simpler, much quicker, and much less likely to make you want to kill yourself. If you have any problems... as always, the community is here to help :).

stoffe
07-14-2007, 02:09 PM
But to be honest with you, you're probably best simply setting up a series of waypoints and getting the creature to walk to each of them in turn - it's much simpler, much quicker, and much less likely to make you want to kill yourself. If you have any problems... as always, the community is here to help :).

I think that would only work if you have the NPC scripted to patrol a certain route. If you just tell them to go to a certain object or location, or if they need to move around on their own (like in combat) they might get stuck trying to run though walls, over pits or though furniture anyway. So it depends on what the new area should be used for. If it's a cutscene area it might work fine to just use waypoints.

I don't know if this is still true for KOTOR (or still is in NWN), but in NWN earlier I vaguely recall there was a difference of how the ActionMoveToObject() and ActionMoveToLocation() functions worked. The first would do pathfinding while the second would try to walk in a straight line to the location.

Pavlos
07-14-2007, 02:14 PM
I think that would only work if you have the NPC scripted to patrol a certain route. If you just tell them to go to a certain object or location, or if they need to move around on their own (like in combat) they might get stuck trying to run though walls, over pits or though other area geometry anyway. So it depends on what the new area should be used for.

Absolutely, I just gathered that seeing as how DSTONEY642000 is attempting to make an NPC move to a particular waypoint, it would have been best to simply place a series of them and have the NPC run to each of them in turn, much as the waypoint AI functions work. It avoids unnecessary work.

DarthStoney
07-15-2007, 10:05 PM
Back when I was working on M4-78RP, I asked a similar question. stoffe managed to come up with a theory (http://www.lucasforums.com/showpost.php?p=2107405&postcount=3) that should work. However, my tests were unsuccessful but I have a feeling that may be to do with me making a mistake - which seems understandable when one considers the labyrinthine nature of the .pth files.

But to be honest with you, you're probably best simply setting up a series of waypoints and getting the creature to walk to each of them in turn - it's much simpler, much quicker, and much less likely to make you want to kill yourself. If you have any problems... as always, the community is here to help :).

Thanks for the info. I will try your way, it does sound much easier and thank you to the whole community as you all have been a big help as always. hopefully before to long I will have something for the whole community will
enjoy.