Jump to content

Webwalk Distance from object


Recommended Posts

Posted
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()

 

  • Like 1
Posted (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 by Khaleesi
  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...