Spielerando

Let archers and turrets shoot only once their body points near enough at the target

If a unit fires the moment it is told to, arrows leave while the body still faces somewhere else, and it looks like cheating. If it demands a perfect aim, it never shoots at all. Here is a tolerance that depends on how big the target looks from where the shooter stands.

Why this works

What counts as hitting depends on how big the target looks from where you stand. A near target fills a wide slice of view, a far one a thin slice. Letting that slice set the allowed aiming error makes shots fair at every distance.

When not to use it

Wrong for weapons that do not need a precise line: area blasts, mortars, flame throwers or anything that always hits the spot. There, fire as soon as the target is in range and skip the aiming wait.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 27 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 "Let archers and turrets shoot only once their body points near enough at the target" (read_entry archer-fires-only-when-the-bow-points-close-enough) 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