Decide what a checkpoint brings back and what stays collected after a death
After a fall the hero reappears at the checkpoint, but are the coins back? The key found after it? The opened door? Left undecided, the AI mixes them up, and the score counts the same coin twice. This entry sorts the things into two kinds and gives each a clear rule.
Why this works
Ask of each thing whether the world should remember it or the player should. What the player earned in the world, like an opened door, stays; what belongs to the attempt, like position and coins, goes back. A total derived from the list can never disagree with it.
When not to use it
Skip the split when the game is built around loss, such as a roguelike where a death resets everything, or when a story must stay fixed. Then reset all, or none, and say so clearly at the start so nobody feels cheated.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 29 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 "Decide what a checkpoint brings back and what stays collected after a death" (read_entry action-checkpoint-respawn-state) 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