Difference between revisions of "GetSleepState - Actor"
Jump to navigation
Jump to search
imported>Henning |
imported>Catwheezle (Changed return value ordering to match GetSleeping. Added "see also" section.) |
||
Line 17: | Line 17: | ||
The following values are returned: | The following values are returned: | ||
* | *0 - Not sleeping | ||
*3 | *2 - Not sleeping, wants to sleep | ||
* | *3 - Sleeping | ||
*4 - Sleeping, wants to wake | |||
== Examples == | == Examples == | ||
Line 29: | Line 29: | ||
endIf | endIf | ||
</source> | </source> | ||
== Notes == | |||
*[[GetSleeping - Actor|GetSleeping]] also has a return value of 1 when the actor is loading the sleep idle. This return value is not documented for this function. | |||
== See Also == | == See Also == | ||
*[[Actor Script]] | *[[Actor Script]] | ||
*[[GetSleeping - Actor]] | |||
*[[IsPCSleeping]] | |||
[[Category:Console Commands]] | |||
[[Category:Condition Functions]] |
Revision as of 18:45, 14 February 2012
Member of: Actor Script
Gets this actor's sleep state.
Syntax
int Function GetSleepState() native
Parameters
None.
Return Value
The actor's current sleep state.
The following values are returned:
- 0 - Not sleeping
- 2 - Not sleeping, wants to sleep
- 3 - Sleeping
- 4 - Sleeping, wants to wake
Examples
; Is the actor sleeping?
if (Sleepy.GetSleepState() == 3)
Debug.Trace("Sleepy is sleeping!")
endIf
Notes
- GetSleeping also has a return value of 1 when the actor is loading the sleep idle. This return value is not documented for this function.