Spielerando

One press opens the door and it closes again right away

A single press seems to count twice, so chests flip open and shut and items are picked up and put back. Your AI adds a delay. This entry finds out which actions really fired twice in a row and how close together they were.

Why this works

Two events a few thousandths of a second apart cannot come from a human hand. They come from two listeners or a key that is reported twice. Finding them first stops the AI from hiding the bug with a delay.

When not to use it

Not for actions that are meant to repeat quickly, such as holding a key to move or fire. Exclude those keys.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 2 common mistakes and the fix
  • 31 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 "One press opens the door and it closes again right away" (read_entry survival-door-opens-and-closes-at-once) 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