Decide which hits break a "finish without being hit" challenge
The player blocked the blow, the shield soaked it up, a rocket jump hurt them, or they were flashing and the hit did nothing. Did the challenge fail? Here is how to sort the cases so the rule feels fair, and why the log must record more than lost health.
Why this works
The player's idea of "not hit" is the generous one: being hurt, not being aimed at. To tell cases apart the game has to record what happened to each attack, not only what was lost, so a rule can be chosen and explained.
When not to use it
Skip the levels in a game where any contact is meant to count, such as a stealth game where being seen is already failure. Use one strict rule and say so before the player starts.
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
- 27 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 "Decide which hits break a "finish without being hit" challenge" (read_entry no-damage-challenge-which-hits-count) 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