Pathing in unowned rooms
-
So, I'm using the pos.findPathTo command to calculate the path between 2 flags. For the most part it's all working fine. Finds a path between two flags in the same room fine. Finds path to exit if the second flag is in another room.
What i'm getting now though. Is if i'm trying to find a path between 2 flags that aren't in a room I own. I get this error.
Error: Could not access room [redacted]
at RoomPosition.findPathTo (/opt/engine/dist/game/rooms.js:748:13)
The command i'm using is below:
Game.flags['Flag7'].pos.findPathTo(Game.flags['Flag8'].pos)Does anyone have a way to do this?
-
The flag on the left side of the of
findPathTomust be in a room you control. Even still,findPathTowill only find a path to the exit closest to the second flag;findPathToonly works in one room.