October 20, 20169 yr Hey all, objects.closest uses linear distance to calculate the closest object, is there a way to find the closest walkable object using pathfinding? (Ex. collisionable objects makes the distance by walking longer than linear distance) Couldn't find anything in the api. Edited October 20, 20169 yr by Trees
October 20, 20169 yr Hey all, objects.closest uses linear distance to calculate the closest object, is there a way to find the closest walkable object using pathfinding? (Ex. collisionable objects makes the distance by walking longer than linear distance) Couldn't find anything in the api. Map#realDistance
October 20, 20169 yr To add to what Khal said, simply add a "true" as the first parameter of a EntityApi.closest() class, like: getObjects().closest(true, "Tree");
October 20, 20169 yr Author Keep in mind this will be much more expensive. Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server.
October 20, 20169 yr Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server. That's a sexy idea.
October 20, 20169 yr Yeah, but how does it work? Is it using A*? Because I imagine that the pathfinding is calculated client sided when you issue a movement order, which could potentially be done by hooking the callback and getting the path and then not sending it to the server. I don't see how this is faster, since it's the difference between locally calculating a path using whichever pathfinding algorithm the OSB team has implemented, and locally calculating a path using whichever pathfinding algorithm Jagex has implemented.
October 20, 20169 yr I don't see how this is faster, since it's the difference between locally calculating a path using whichever pathfinding algorithm the OSB team has implemented, and locally calculating a path using whichever pathfinding algorithm Jagex has implemented. Faster, no, but it would be useful in that is would be the exact path your character is going to follow before walking.
Create an account or sign in to comment