To do this kind of thing, in the past I would have used ListenForEvent to listen for any changes in the sanity (the sanitydelta" event), but since that event is fired any time a sanity change is applied, it is actually fired every single frame during dusk and night and when you're close to monsters with a negative sanity aura. Instead, I'd make it a task which handles all of this, that only runs every 0.5 to 1.0 seconds. In the template below, it runs every 0.5 seconds. Here is a template f