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 been using creep.moveTo with ignoreCreeps: false, and I've noticed that if all paths are blocked by creeps, my creep will just walk to those creeps and then not do anything. The API says that ERR_NO_PATH should be returned when no path is found, but creep.moveTo is instead returning 0 in this case, even though all paths are blocked.
The text was updated successfully, but these errors were encountered:
I have noticed similar issue. So far it seems that the problem comes from the fact that the path finding for this function returns unfinished path if the location is blocked.
If you are 10 tiles away from your location and only all tiles in range of 1 are blocked the path finder will provide you with path...but it will be one tile short. And your creep will move...1 tile short of its initial destination.
If you are however in range of 2 tiles and all tiles in range of 1 are blocked the path finder will not give you any path...resulting in ERR_NO_PATH being given.
However, this implementation works for sources and other structures on which you can't walk over without providing range:1 property to moveTo.
I've been using creep.moveTo with ignoreCreeps: false, and I've noticed that if all paths are blocked by creeps, my creep will just walk to those creeps and then not do anything. The API says that ERR_NO_PATH should be returned when no path is found, but creep.moveTo is instead returning 0 in this case, even though all paths are blocked.
The text was updated successfully, but these errors were encountered: