Breathing bad air: a poison dose that builds and fades, and a warning of how long is left
Spores, smoke or cellar gas should hurt more the longer and the thicker the player breathes them, yet the body clears some of it. Here is a dose that rises and falls the same at any frame rate, and the exact time left before a symptom or collapse.
Why this works
A body takes in poison and clears it at the same time, and the clearing gets stronger the more there is. That is why the dose settles at a level instead of climbing forever, and why one calculation gives the same answer whether frames are long or short.
When not to use it
Skip it when the danger is meant to be sudden and binary, such as a trap room where one breath kills. A slowly building dose with a countdown softens it; use a plain timer or an instant outcome instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 21 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Breathing bad air: a poison dose that builds and fades, and a warning of how long is left" (read_entry narr-toxic-gas-dose-clearing) 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