Credit a quest kill when a spike pit or explosion finishes the enemy
The player knocks a guard toward a pit, the guard falls, and the quest does not move. Or a barrel explodes and nobody gets credit. Here is how to decide who earned a defeat when the last damage came from the level itself.
Why this works
Players judge fairness by who caused the fall, not by what dealt the last blow. Remembering recent hits and pushes, and letting a claim fade as time passes, gives credit to the person who set up the death without rewarding a hit from long ago.
When not to use it
Do not use it in a game with one player and no team, or where hazards are meant as a fair kill for nobody. Also avoid it when credit decides money against other players; a clear rule they can see works better there.
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
- 15 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 "Credit a quest kill when a spike pit or explosion finishes the enemy" (read_entry credit-kill-when-hazard-finishes-enemy) 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