Count enemy kills for a quest only from the moment it was accepted
A player clears a room, then walks to the quest giver and finds the job already half done, or done twice because one enemy reported its death two times. Here is how to draw the starting line fairly and make each defeat count exactly once.
Why this works
A count is only fair if every defeat is counted once and only once the promise exists. Putting events in one fixed order, instead of trusting clocks, and remembering who has already fallen, keeps double reports and late arrivals from counting twice or counting too early.
When not to use it
Skip it when you want every enemy ever beaten to count, as in a lifetime tally or a trophy for the whole game. A simple running total is the right tool 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
- 32 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 enemy kills for a quest only from the moment it was accepted" (read_entry kill-quest-counts-only-after-accepting) 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