User Tools

Site Tools


set_time

This is an old revision of the document!


Set Time


Sets the current in-game time in seconds. If the provided value is less than zero or greater than the game's day/night cycle duration, the in-game day will be decremented or incremented accordingly. Refer to the Set Day function for details about changing the in-game day.

Signature:

set_time(time)
ArgumentDescriptionTypeRequired
timeValue to set the current time to (in seconds).NumberYes

Example:

set_time(0);

Results: Sets the current in-game time to the start of the day (i.e. midnight).

Use the Set Time function to progress time, for example to allow the player to sleep until the next morning when they interact with a bed.


Editor Node:

Visual Demo:

set_time.1730750506.txt.gz · Last modified: 2024/11/04 12:01 by justin