Delivery Posted September 4, 2023 Posted September 4, 2023 Is it possible to view the Webwalking path and get a distance value for a position? I want to be able to Chop the closest tree to me by distance not distance by a bird's flight. A Tree might be 2 tiles from me but is actually 14 tiles distance & there could be a 4 tile tree right next to me.
Gunman Posted September 4, 2023 Posted September 4, 2023 31 minutes ago, xcx said: Is it possible to view the Webwalking path and get a distance value for a position? I want to be able to Chop the closest tree to me by distance not distance by a bird's flight. A Tree might be 2 tiles from me but is actually 14 tiles distance & there could be a 4 tile tree right next to me. getMap().realDistance() 1
Khaleesi Posted September 4, 2023 Posted September 4, 2023 (edited) 1 hour ago, xcx said: Is it possible to view the Webwalking path and get a distance value for a position? I want to be able to Chop the closest tree to me by distance not distance by a bird's flight. A Tree might be 2 tiles from me but is actually 14 tiles distance & there could be a 4 tile tree right next to me. This will get you all positions in a webwalking path, I guess you could use path.length() WebWalkEvent event = new WebWalkEvent(position); event.prefetchRequirements(script); Position[] path = event.getPositions(); Edited September 4, 2023 by Khaleesi 1