Background for Skyrim SE
Member of the ObjectReference script
eventOnLoad()

[DEV SERVER] Loading description...


Caveats

CK Wiki - Notes

  • This event is only sent when an object's 3d is loaded. This may or may not have anything to do with its parent cell and/or the player's location in the world.
  • To be clear: For interiors, it often looks like this event fires whenever the player enters the cell. It doesn't. If you leave a cell, the cell may or may not have unloaded by the time you return, which means this event may or may not fire again. If you need a reliable event every time the player enters a cell, try attaching an ObjectReference.OnCellAttach() event to any Object Reference in the cell instead.
  • This event will NOT ever fire if used in a Player Alias script. The only event related to cell attachment or 3D-loading that the Player themselves seems to trigger is ObjectReference.OnCellLoad().
  • This event doesn't fire reliably for references that load 3D while or immediately after the player loads a savegame.
  • This event will not fire for disabled objects.

Examples

Event OnLoad()
  Debug.Trace("This object is loaded, playing animations should work now")
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends ObjectReference

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