DarthStoney Posted July 13, 2007 Share Posted July 13, 2007 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. Link to comment Share on other sites More sharing options...
Pavlos Posted July 14, 2007 Share Posted July 14, 2007 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 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 . Link to comment Share on other sites More sharing options...
stoffe Posted July 14, 2007 Share Posted July 14, 2007 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. Link to comment Share on other sites More sharing options...
Pavlos Posted July 14, 2007 Share Posted July 14, 2007 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. Link to comment Share on other sites More sharing options...
DarthStoney Posted July 16, 2007 Author Share Posted July 16, 2007 Back when I was working on M4-78RP, I asked a similar question. stoffe managed to come up with a theory 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.