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
When using travelTo to navigate to within a certain range of a position that is near an exit, the creep will stop when it is within (range number of tiles) of the location, regardless of whether it is in the same room or not. This issue can cause creeps to idle indefinitely near room exits, especially for code that treats multiple rooms as a single unit.
For example, when navigating from a right room to within range 3 of a flag in the left room at position x=48, the creep will stop moving at x=1 of the right room. This problem is due to PathFinder terminating its path search at range 3, regardless of whether creep.pos.inRangeTo(target, range) evaluates to true.
A proposed solution would be adding a ensureSameRoom option to Traveler, which would guarantee that the creep ends up in the same room as its target.
The text was updated successfully, but these errors were encountered:
When using travelTo to navigate to within a certain range of a position that is near an exit, the creep will stop when it is within (range number of tiles) of the location, regardless of whether it is in the same room or not. This issue can cause creeps to idle indefinitely near room exits, especially for code that treats multiple rooms as a single unit.
For example, when navigating from a right room to within range 3 of a flag in the left room at position x=48, the creep will stop moving at x=1 of the right room. This problem is due to PathFinder terminating its path search at range 3, regardless of whether
creep.pos.inRangeTo(target, range)
evaluates to true.A proposed solution would be adding a
ensureSameRoom
option to Traveler, which would guarantee that the creep ends up in the same room as its target.The text was updated successfully, but these errors were encountered: