Count a hit once, even when the network delivers the message twice
Networks repeat messages, and a repeated hit report means double damage or a second kill reward. This entry shows how to recognise a report you have already handled without keeping a list that grows forever, and how a very old report must be treated.
Why this works
Networks sometimes deliver one message twice. Giving every hit its own name and remembering the names lets the second copy be turned away. Remembering forever costs space, so old names are forgotten and old copies are refused for being old.
When not to use it
Skip it when a repeated message does no harm, for example a report that only states a value, like health is now this, instead of adding to it. Applying it twice changes nothing there. Better to make the message itself harmless than to track names.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 18 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 "Count a hit once, even when the network delivers the message twice" (read_entry ignore-repeated-hit-reports-by-id) 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