Spielerando

Push an enemy back and let it hit a wall or fall into the water

Shoving is a fun tool in an open map, but the details bite: what if something stands behind, what if the edge of the map comes, does the fall end the push? This entry fixes the order of checks and the extra damage for hitting something.

Why this works

A push is only fair if the player can read where it ends. Checking each tile in a fixed order, and letting what blocks the path decide, makes the result predictable, and rewarding a hard shove into a wall turns the map itself into a weapon.

When not to use it

Skip it in games without a map of tiles, where a push would just look like a jump, and when the fall would kill too easily and frustrate. Use a stun or a slow instead of moving the target.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Push an enemy back and let it hit a wall or fall into the water" (read_entry knockback-stops-at-walls-and-falls-into-pits) 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