The button that closes a dialogue immediately starts the next conversation
Close a text box with the same button that opens it and the hero talks again at once, or a shop menu closes and the purchase repeats. Players call it a bug and feel they lost control. Here is a small rule about which buttons count after a menu, and which should carry straight on.
Why this works
A key press belongs to one moment, but a finger stays down for a while. Remembering that a key was already down when the window closed, and ignoring it until it is released, lets one press do one thing, however long it lasts.
When not to use it
Do not latch keys the player is meant to hold, such as a charge, a block or a run button. There the held key carries on after a dialogue, and only separate one-shot actions should wait for a release.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 17 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 "The button that closes a dialogue immediately starts the next conversation" (read_entry rpg-action-key-latch-after-menu) 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