Omni-bots getting stuck
Waypointing | Omni-bots getting stuck |
Bots can't move perfectly, and sometimes they can fall off edges or otherwise get pushed or dislodged from their intended path, usually due to weapon push or game physics. When this happens, they can sometimes get stuck. When the bot is unable to make meaningful progress in his path for a small amount of time, it assumes it has become stuck, and the current path attempt will fail. The important part of this process is that there is suitable waypoint placement to recover from getting stuck. Here's an example.
In this screenshot, we see a path that goes across the top of the thin wall. Occasionally the bot may fall off the wall and end up in the small square enclosure below it. You may not think it necessary to place waypoints on that square area below the edge, because the bot should never need to go there, but without the 3 waypoints, when the bot falls down and fails his goal and goes to re-plan a new path, we need to make sure he finds a starting waypoint in a reachable location. If we didn't have the waypoints in the square area below the wall chances are he would pick the waypoints on top of the wall as the nearest points to start from, and result in a stuck loop since he can't get to the waypoints on top.
Here's another example that illustrates this kind of problem. In the following screenshot, the bot is obviously trying to reach the waypoint marked 1, because this is the closest waypoint to the bot's current position. An obvious solution would be to add another waypoint, close to the spot marked 2 in the image, and (bi)connect it to some other waypoint on the right.
This is a common problem with stuckage in maps. By understanding this you should be able to pick out areas of a map that could have this problem. Simply place a waypoint in the corner where they tend to get stuck and link it back to make them backtrack a bit and try again. Also see blockable flags sections. Failure to mark paths as blockable is another very common cause of stuckage problems.
Another problem can occur when a bot is travelling between 2 waypoints next to a wall see's a third waypoint that is closer then the first 2 waypoints behind the wall. The bot will sometimes try and go to the third waypoint because it is the closest. Normally this would not be a problem but because bots do not see walls they will walk into them and become stuck. To fix this you should add a forth waypoint between the first & second waypoint (removing the connections between them) that is closer then the third then connect the waypoints back up. This same problem can also apply with mapgoals such as the command post or other map objectives.