Tazmania Posted January 6, 2016 Posted January 6, 2016 Hi all I am trying to walk to a specific tile using getLocalWalker().walk(myTile); however this will walk the player to the tile or any one of the surrounding ones. If the player is close (3-4 blocks away) to the position he will not walk at all. How can I walk to THE specific position?
Explv Posted January 6, 2016 Posted January 6, 2016 (edited) Hi all I am trying to walk to a specific tile using getLocalWalker().walk(myTile); however this will walk the player to the tile or any one of the surrounding ones. If the player is close (3-4 blocks away) to the position he will not walk at all. How can I walk to THE specific position? WalkingEvent walkingEvent = new WalkingEvent(position); walkingEvent.setMinDistanceThreshold(0); execute(walkingEvent); Edited January 6, 2016 by Explv
Tazmania Posted January 6, 2016 Author Posted January 6, 2016 new WalkingEvent(position).setMinDistanceThreshold(0).execute(); Tried it and kept getting this crash
steve498 Posted January 6, 2016 Posted January 6, 2016 (edited) Create a walking event to a path of one tile and then set the minimap and min distance to 0 like so: WalkingEvent walkingPath = new WalkingEvent(PositionName); walkingPath.setMiniMapDistanceThreshold(0); walkingPath.setMinDistanceThreshold(0); execute(walkingPath); This has always worked for me. Edited January 6, 2016 by steve498
Explv Posted January 6, 2016 Posted January 6, 2016 (edited) Tried it and kept getting this crash My bad i thought you could chain them. In that case just separate it like this: WalkingEvent walkingEvent = new WalkingEvent(position); walkingEvent.setMinDistanceThreshold(0); execute(walkingEvent); Edited January 6, 2016 by Explv
Tazmania Posted January 6, 2016 Author Posted January 6, 2016 Create a walking event to a path of one tile and then set the minimap and min distance to 0 like so: WalkingEvent walkingPath = new WalkingEvent(PositionName); walkingPath.setMiniMapDistanceThreshold(0); walkingPath.setMinDistanceThreshold(0); execute(walkingPath); This has always worked for me. Same problem, walking to one of the adjacent tiles and won't walk if he is 3 tiles close to the destination.
Explv Posted January 6, 2016 Posted January 6, 2016 Same problem, walking to one of the adjacent tiles and won't walk if he is 3 tiles close to the destination. Paste your exact code? 1