Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Traversing

Joined
Apr 6, 2017
Messages
29
Is there a simple way to make my character move to a certain coordinate if he's not on the square already?

Everything I'm seeing is building a class for it. Does anyone know of a simple way to make him move to it if he's near it already and the coordinates are defined? At most he'll be 3 or 4 steps away from it already. Thanks
 
Joined
Dec 1, 2016
Messages
59
If you are sure it will always be on screen you can interact with the coordinate. If not you will want to generate a path (region/web/bresenham) and then convert it into a viewportPath. This will use the main viewport instead of the minimap to walk
 
Joined
Dec 1, 2016
Messages
59
Take an existing path and use the static method
ViewportPath.convert(CoordinatePath old path);

Calling .step() on this new path will walk you towards or onto the coordinate you have set.

Questions like these can be asked on the development slack, which can be joined by visiting
Join Developer Chat | RuneMate
 
Top