User Tools

Site Tools


set_time

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: Changes the current in-game time back 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:

set_time.txt · Last modified: 2024/11/04 14:40 by justin