IsTimePassing

Revision as of 11:57, 20 June 2008 by imported>Vswe (Added Search Terms)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Returns 1 if the player is sleeping, resting, or traveling (i.e. time is passing while in menu mode).

Example:

if IsTimePassing == 1
  do stuff
endif

This function is particularly useful inside a MenuMode block when you want a script to run only if time is passing while the menu is showing.

For example, the following script will return 1 only if the player is actually in the act of sleeping or waiting (otherwise the MenuMode function alone will return 1 anytime the the sleep/wait menu is displayed, even if the player cancels without sleeping or waiting.)

begin MenuMode 1012
 if IsTimePassing == 1
    do stuff
  endif
end