TimeSinceLastVisit

Minutes elapsed since the given scene was last pushed or the given location was last entered. Returns int.MaxValue if the scene or location has never been visited.

Category: Visit tracking Returns: int

Signature

TimeSinceLastVisit(sceneOrLocationId)

The argument is a scene ID (scene_tavern) or a location ID (location_market). The counter advances only via explicit AdvanceTime events; movement between scenes does not on its own move the clock.

Examples

TimeSinceLastVisit(scene_tavern) > 60   // an hour-plus since the tavern visit
TimeSinceLastVisit(location_alley) < 5  // they were just here
Visits(scene_anne) > 0 && TimeSinceLastVisit(scene_anne) > 30
                                        // gate the "been a while" greeting

Notes

The never-visited sentinel is int.MaxValue. This means TimeSinceLastVisit(X) > 5 is true for never-visited scenes too. Pair with Visits(X) > 0 when you want “visited AND a while ago” semantics:

Visits(scene_X) > 0 && TimeSinceLastVisit(scene_X) > 30

Companion function: Visits. Total push/arrival count (session-global, doesn’t decay).

Docs last synced: 2026-07-08
Screenshot viewer