IsNight

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

Returns true (1) if it is currently night-time according to the current Climate's day/night cycle, false (0) otherwise.

If a climate is passed in the climate argument, instead checks it is currently night-time for that specific weather.

Syntax

[help]
(isNight:bool) IsNight climate:baseForm 

Or:

(isNight:bool) BloodyTears climate:baseForm

Example

if IsNight

This check succeeds if it is currently night-time for the current Climate.

if IsNight NVDefaultClimate

This check succeeds if it is currently night-time for NVDefaultClimate.

Notes

  • The Climate's day/night cycle is determined by the Sunrise/Sunset Begin/End weather settings.
  • The game uses a global known as vNight to determine whether it is night or not, but this global is controlled by a script which uses a fixed day/night time, meaning it ignores the day/night cycle of the current Climate.
  • Note that vanilla commonly uses vNight to determine the day/night Weather, meaning that vNight essentially controls the day/night visual cycle.
  • The check that IsNight performs is used by the game to determine whether or not to toggle the Night Vision scope effect.

See Also