xVril 28 Share Posted June 3, 2020 Hi, I have been trying to figure this out. I have two entities: The local player. A moving NPC I want the local player to walk to the moving NPC, my issue is there may be obstacles. Normally in the past I have handled these obstacles individually. My issues here is these obstacles are dynamic game objects, so adding a specific tile is useless, they are passable. I have tried to add them as Passable Obstacles but still when walking to the NPC it makes no attempt to pass them. In Pseudo code I am assuming it would be something like this: if ( ObstacleExistsBetweenPointAandPointB) PassObstacle(); Else WalkToNPC() && InteractNPC(); Any help would be much appreciated Link to comment Share on other sites More sharing options...
Pseudo 179 Share Posted June 4, 2020 You could have an array of names/ids for your objects, then in your walking logic have a break clause if within X tiles of an object to deal with it? Link to comment Share on other sites More sharing options...
Im A Baller 348 Share Posted June 5, 2020 The Map API will be very useful for this: https://dreambot.org/javadocs/org/dreambot/api/methods/map/Map.html Link to comment Share on other sites More sharing options...
xVril 28 Author Share Posted June 5, 2020 6 hours ago, Im A Baller said: The Map API will be very useful for this: https://dreambot.org/javadocs/org/dreambot/api/methods/map/Map.html Have tried using addObstacleActions() No matter what I do canReach() returns true even when the Path is blocked so not sure what other methods would be useful in the Map class. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.