Shift-queued orders and an attack-move that fights and then keeps going
Players give a squad a chain of orders and expect it to march, fight whatever it meets and carry on. The usual bug is a fight that eats the rest of the chain, or a new order that cancels everything when it should have been added. Here is the order list that behaves.
Why this works
What a unit is doing right now is worked out fresh from its list of orders and from who is near. Nothing about the fight is stored, so nothing can go stale or swallow the orders waiting behind it.
When not to use it
It is the wrong tool for games where each unit acts on its own judgement and the player only sets a goal, or where a squad must react to a threat by dropping its plan. There, give units a priority of wishes instead of a fixed chain.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 26 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Shift-queued orders and an attack-move that fights and then keeps going" (read_entry queued-orders-and-attack-move-resume) 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