Evesy Posted May 3, 2019 Posted May 3, 2019 (edited) Hey guys, When my bot is close to the coordinates it has to go to and it gets the new command: getWalking().walk(AREA); It just ignores it and thinks it's there already, I have to same problem when I'm using webWalk instead of the normal walk function. Does anyone perhaps know when I'm doing wrong here? Edited May 3, 2019 by Evesy typo's
fhhhphgj Posted May 3, 2019 Posted May 3, 2019 I'm not exactly sure what it was but IIRC it checks if you are within X tiles to the destination, so when you get close to the target it returns true. Meaning if you wanted to get to a specific tile you would need to add a custom method, see below. private static boolean walk(Script script, Position position) { WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); return script.execute(event).hasFinished(); } I could be wrong maybe better to check with someone who isn't as rusty as me when it comes to the methods. 1
Juggles Posted May 3, 2019 Posted May 3, 2019 If you're within 2-3 tiles it thinks you're in the area. Use the code above to override it 1
Evesy Posted May 3, 2019 Author Posted May 3, 2019 1 hour ago, fhhhphgj said: I'm not exactly sure what it was but IIRC it checks if you are within X tiles to the destination, so when you get close to the target it returns true. Meaning if you wanted to get to a specific tile you would need to add a custom method, see below. private static boolean walk(Script script, Position position) { WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); return script.execute(event).hasFinished(); } I could be wrong maybe better to check with someone who isn't as rusty as me when it comes to the methods. 8 minutes ago, Juggles said: If you're within 2-3 tiles it thinks you're in the area. Use the code above to override it Thanks a lot guys! Noob question coming in: how do I implement this?.. 1
Juggles Posted May 3, 2019 Posted May 3, 2019 walk(script, position); 18 minutes ago, Evesy said: Thanks a lot guys! Noob question coming in: how do I implement this?..
Chris Posted May 3, 2019 Posted May 3, 2019 https://osbot.org/api/org/osbot/rs07/event/WalkingEvent.html#setMinDistanceThreshold-int-
Zummy Posted May 3, 2019 Posted May 3, 2019 Why can't you set min distance for webwalk, I was wondering that the other day?
Evesy Posted May 4, 2019 Author Posted May 4, 2019 Thanks a lot everyone, I'm going to try it out today! 6 hours ago, Zummy said: Why can't you set min distance for webwalk, I was wondering that the other day? Yes I'm also wondering this now haha