Background for Skyrim SE
Member of the Form script
eventOnSleepStop(boolabInterrupted)

Description

Wiki Description

Event called when the player wakes up - if this active magic effect/alias/form is registered for it.

Documentation Comment

Received when the player stops sleeping - whether naturally or interrupted (after registering)


Caveats

CK Wiki - Notes

  • Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
  • This event is not relayed to any aliases or magic effects attached to the form.

Parameters

  1. boolabInterrupted

    CK Wiki Description

    Whether sleep was interrupted or not.


Examples

Function SomeFunction()
  RegisterForSleep() ; Before we can use OnSleepStop we must register.
EndFunction

Event OnSleepStop(bool abInterrupted)
    if abInterrupted
        Debug.Trace("Player was woken by something!")
    else
        Debug.Trace("Player woke up naturally")
    endIf
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends Form

event OnSleepStop(bool abInterrupted)
    Debug.trace("Event received - OnSleepStop: abInterrupted = " + abInterrupted)
endEvent

Related Pages


Additional References

View this event’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.