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 RegionPath is always returning null

Joined
Apr 21, 2017
Messages
14
Hi everyone,
I am trying to use region path in RS3 but it keeps returning null, I have no idea why. Can someone help me on this? I am not sure what the error even is.
Thanks in advance.
Code:
Code:
riftCoord = new Coordinate(2890,3047,0);
RegionPath regionPath = RegionPath.buildTo(riftCoord);
if(regionPath != null)
         regionPath.step();
 
Last edited:
Joined
May 24, 2016
Messages
1,113
You are most likely trying to build a path to a coordinate outside of your current region, hence why it returns null. RegionPath's can only build to coordinates within your current region.
 
Joined
Apr 21, 2017
Messages
14
You are most likely trying to build a path to a coordinate outside of your current region, hence why it returns null. RegionPath's can only build to coordinates within your current region.
alright, how do I check my region, because I'm like 15-20 blocks away from the coordinates.
 
12 year old normie
Joined
Jan 8, 2015
Messages
2,768
Is it vital that you need region pathing? If it's only a few tiles away you might as well use bresenham path for a faster generation of the path.
 
Joined
Apr 21, 2017
Messages
14
Is it vital that you need region pathing? If it's only a few tiles away you might as well use bresenham path for a faster generation of the path.
good Idea, don't know why I didn't do this in the first place. Thanks very much.
EDIT:
bresenham pathing works, Thanks again.
 
Top