xVril 12 Share Posted June 3, 2020 (edited) 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 Edited June 3, 2020 by xVril Link to comment Share on other sites More sharing options...
Pseudo 178 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 346 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 12 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now