Make a night-only story scene reachable for a player who arrives by day
Some scenes only make sense in the dark, or at dawn, and a player who shows up at the wrong hour either breaks the scene or has to guess why nothing happens. Here is how to work out when they can really start it, and how long they have to wait.
Why this works
Time of day goes in circles, so a window that crosses midnight cannot be tested with simple more-than and less-than. Measuring how far into the window you arrive, and whether the whole scene still fits, works for every window.
When not to use it
Skip it when the scene can run at any hour and only looks nicer at night. There, change the light and leave the timing alone; making the player wait for dark is a cost, and it is not always worth it.
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
- 14 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 "Make a night-only story scene reachable for a player who arrives by day" (read_entry night-only-scene-needs-a-time-window) 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