You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had problems recently where my creeps fail to path between rooms correctly using creep.moveTo(), no matter how high I set maxOps. They walk to a solid room wall.
On investigating the code, I think the problem is that in RoomPosition.prototype.findPathTo , the exit direction is chosen using: var exitDir = room.findExitTo(roomName);
rather than something like var exitDir = room.findExitTo(roomName, opts);
(which would also require a small edit to room.findExitTo, to make it pass opts through to findExit).
So right now, no matter how you set options in creep.moveTo, if the destination is in another room, only 2000 operations are spent trying to decide which exit to path to.
The text was updated successfully, but these errors were encountered:
findExit uses findRoute which does pathfinding at the map level, room to room using just exits, not intra-room pathfinding involving terrain. findRoute has no cpu limit; it will always find the route if there is one, and its opts doesn't include anything other than a callback function.
I've had problems recently where my creeps fail to path between rooms correctly using creep.moveTo(), no matter how high I set maxOps. They walk to a solid room wall.
On investigating the code, I think the problem is that in RoomPosition.prototype.findPathTo , the exit direction is chosen using:
var exitDir = room.findExitTo(roomName);
rather than something like
var exitDir = room.findExitTo(roomName, opts);
(which would also require a small edit to room.findExitTo, to make it pass opts through to findExit).
So right now, no matter how you set options in creep.moveTo, if the destination is in another room, only 2000 operations are spent trying to decide which exit to path to.
The text was updated successfully, but these errors were encountered: