Difference between revisions of "IsTimePassing"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Phinix
imported>DragoonWraith
(CS 1.0)
Line 3: Line 3:
'''Example:'''
'''Example:'''
   
   
    if IsTimePassing == 1
if IsTimePassing == 1
        do stuff
  do stuff
    endif
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.
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.
Line 11: Line 11:
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.)
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
begin MenuMode 1012
        if IsTimePassing == 1
  if IsTimePassing == 1
            do stuff
    do stuff
        endif
  endif
    end
end


[[Category: Functions]]
[[Category: Functions]]
[[Category: Functions (CS 1.0)]]
[[Category: Player Functions]]
[[Category: Player Functions]]
[[Category: Player Functions (CS 1.0)]]
[[Category: Condition Functions]]
[[Category: Condition Functions]]

Revision as of 11:16, 12 July 2007

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