sudoinit6 Posted March 25, 2017 Share Posted March 25, 2017 How to I walk to a random tile within an Area? Quote Link to comment Share on other sites More sharing options...
Isolate Posted March 25, 2017 Share Posted March 25, 2017 getWalking().walk(Area); getWalking().webWalk(Area); Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted March 25, 2017 Share Posted March 25, 2017 Area area = new Area(1,2,3); walking.webWalk(area.getRandomPosition()); Quote Link to comment Share on other sites More sharing options...
sudoinit6 Posted March 25, 2017 Author Share Posted March 25, 2017 6 minutes ago, Isolate said: getWalking().walk(Area); getWalking().webWalk(Area); Hmm, that's what I use but they seem to go to the exact same spot in each area, maybe I am mistaken. Thanks. Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted March 25, 2017 Share Posted March 25, 2017 https://osbot.org/api/org/osbot/rs07/api/map/Area.html#getRandomPosition-- Quote Link to comment Share on other sites More sharing options...
sudoinit6 Posted March 25, 2017 Author Share Posted March 25, 2017 1 minute ago, Polymorphism said: Area area = new Area(1,2,3); walking.webWalk(area.getRandomPosition()); Aha! That's what I was looking for. Thanks much! Quote Link to comment Share on other sites More sharing options...
Easy Posted March 25, 2017 Share Posted March 25, 2017 47 minutes ago, sudoinit6 said: Aha! That's what I was looking for. Thanks much! Be careful, if your area contains tiles that aren't traversable, area.getRandomPosition() will bug out osbot's walkers. 2 Quote Link to comment Share on other sites More sharing options...
Alek Posted March 25, 2017 Share Posted March 25, 2017 2 hours ago, Easy said: Be careful, if your area contains tiles that aren't traversable, area.getRandomPosition() will bug out osbot's walkers. Wont quite bug it out, but it will just fail. 1 Quote Link to comment Share on other sites More sharing options...