Spielerando

Count deaths once when a player is killed again and again right after respawning

An enemy camps the respawn point and the player dies six times in ten seconds. The "die fewer than five times" challenge is lost through no fault of theirs, and the rank for the level falls. Here is how to separate one bad moment from six real mistakes.

Why this works

Several deaths in quick succession are one failure of the game, not several failures of the player. Grouping them by how close together they are, with a limit on how long a group may last, keeps a trap from being counted as many while preventing it from hiding real ones.

When not to use it

Do not group deaths in a game where each death is a deliberate cost, like a hardcore mode. Fix the trap itself with a short moment of safety after respawning, and count every death honestly.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • A diagram of every state
  • 28 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 "Count deaths once when a player is killed again and again right after respawning" (read_entry count-deaths-once-in-a-spawn-trap) 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