Spielerando

Stop units stuck in a queue from running on the spot, and restart them cleanly

When a corridor is jammed, soldiers pressed against each other keep their legs going while hardly moving, like cartoon characters before a cliff. Switching to a waiting pose the moment the speed dips makes them flicker in a slow queue. This entry decides when a unit counts as blocked, and when it counts as free again.

Why this works

What a unit does and what it was told to do are different, and the gap between them says whether it is stuck. A stuck unit should look like it is waiting, not running into a wall. Using two limits, with a short delay, stops the picture from flipping in a queue.

When not to use it

Don't use it for things that really do push on, such as a battering ram against a gate, a tug of war or a monster clawing at a door. Showing effort against a blocker is exactly right there, so keep the straining pose.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 30 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Stop units stuck in a queue from running on the spot, and restart them cleanly" (read_entry blocked-unit-stops-walking-in-place-and-waits) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP