Background for Fallout 4
Member of the ScriptObject script
eventOnPlayerSleepStop(boolabInterrupted, ObjectReferenceakBed)

Description

Wiki Description

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

This event will only be sent to the specific script that registered for it. Other scripts attached to the same form/alias/active magic effect will not receive the event unless they also register.

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.

Parameters

  1. boolabInterrupted

    CK Wiki Description

    Whether sleep was interrupted or not.

  2. ObjectReferenceakBed

    CK Wiki Description

    The bed the player activated.


Examples

Function SomeFunction()
  RegisterForPlayerSleep() ; Before we can use OnSleepStart we must register.
EndFunction

Event OnPlayerSleepStop(bool abInterrupted, ObjectReference akBed)
    if abInterrupted
        Debug.Trace("Player was woken by something while sleeping in " + akBed + "!")
    else
        Debug.Trace("Player woke up naturally from " + akBed)
    endIf
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends ScriptObject

event OnPlayerSleepStop(bool abInterrupted, ObjectReference akBed)
    Debug.trace("Event received - OnPlayerSleepStop: abInterrupted = " + abInterrupted + " akBed = " + akBed)
endEvent

Related Pages


Additional References

View this event’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.