Hallucinations and screen effects flicker on and off when sanity hovers near a limit
When the fear effect switches on below one value and off above the same value, a number that wobbles around it makes the screen stutter. Here is how to give each level a separate way in and way out, so effects stay on until the player has really recovered.
Why this works
A value that drifts will cross a line many times before it truly leaves. If the way in and the way out are the same line, every crossing flips the picture. Making leaving harder than entering lets the player's real recovery decide.
When not to use it
Do not use it when the effect should follow the number exactly, such as a smooth blur that grows as sanity falls. There, scale the effect continuously and smooth the number itself instead of adding stages.
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
- 21 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 "Hallucinations and screen effects flicker on and off when sanity hovers near a limit" (read_entry fear-effects-flicker-near-the-threshold) 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