OnSleepStart - Form

Revision as of 16:26, 18 October 2011 by imported>Rhavlovick (1 revision: Clobber re-import by Henning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: ActiveMagicEffect Script, Alias Script, and Form Script

Event called when the player goes to sleep - if this active magic effect/alias/form is registered for it.

SyntaxEdit

Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)

ParametersEdit

  • afSleepStartTime: The time the player went to sleep, in game days passed.
  • afDesiredSleepEndTime: The time the player wants to wake up at, in game days passed.

ExampleEdit

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

Event OnSleepStart(float afSleepStartTime, float afDesiredSleepEndTime)
	Debug.Trace("Player went to sleep at: " + Utility.GameTimeToString(afSleepStartTime))
	Debug.Trace("Player wants to wake up at: " + Utility.GameTimeToString(afDesiredSleepEndTime))
endEvent

NotesEdit

  • 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.

See AlsoEdit