Skip to content

timesincesleep

Daedalus1400 edited this page May 16, 2017 · 3 revisions

Description:

The timesincesleep condition checks how long since the player successfully slept.

Added in release version 0.2.0

Arguments:

type

Must be "timesincesleep".

comparison

Accepts a string. Valid values are "<", and ">".

value

Accepts a number. Number of days since last sleep completed

Example Usage:

The following example checks if the player has slept in the past two in game days (~40 minutes real time):

{"type": "timesincesleep", "comparison": ">", "value": 2}

This is will evaluate as:

(world.getTotalWorldTime() - lastsleeptime) > (2 * 24000);

Clone this wiki locally