Background for Skyrim SE
Member of the Actor script

Description

Wiki Description

Event called when the player loads a save game. This event is only sent to the player actor. If this is the first save game load where the event is being listened to, and the event is on an alias, and the alias didn't exist at the time the save was made, then the player won't be in the alias by the time the event is sent, and the alias script will not receive the event. It should then receive later events.

Documentation Comment

Received immediately after the player has loaded a save game. A good time to check for additional content.


Caveats

CK Wiki - Notes

This event is only sent to the player actor. It is recommended that you handle this event via an alias the player is forced into, or a magic effect on the player.
This event will not be sent when starting a new game. See the discussion page for more information.


Examples

; Event is only sent to the player actor. This would probably be on a magic effect or alias script
Event OnPlayerLoadGame()
  Debug.Trace("player loaded a save, do some fancy stuff")
endEvent
ScriptName YourQuestScript extends Quest
 
Float Property fYourModVersion Auto

Event OnInit()
    Maintenance()
EndEvent
 
Function Maintenance()
    If fYourModVersion < 1.23 ; Current version
        If fYourModVersion
            Debug.Trace("Updating from version " + fYourModVersion)
        Else
            Debug.Trace("Initializing for the first time.")
        EndIf
        fYourModVersion = 1.23
    EndIf
EndFunction
ScriptName YourPlayerAliasScript extends ReferenceAlias
 
YourQuestScript Property QuestScript Auto

Event OnPlayerLoadGame()
    QuestScript.Maintenance()
EndEvent

Auto-Generated Example

Scriptname MyCoolScript extends Actor

event OnPlayerLoadGame()
    Debug.trace("Event received - OnPlayerLoadGame")
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.