GetSleepState - Actor
Revision as of 12:52, 8 September 2011 by imported>Henning (→Examples)
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:
- 4: Sleeping, wants to wake
- 3: Sleeping
- 2: Not sleeping, wants to sleep
- 0: Not sleeping
Examples
; Is the actor sleeping?
if (Sleepy.GetSleepState() == 3)
Debug.Trace("Sleepy is sleeping!")
endIf