OnLoad - ObjectReference
Member of: ObjectReference Script
Event called when the object's 3d is loaded and ready. At this point you should be able to animate the object, or manipulate it in other ways without issues. This event is sent every time the 3d is loaded, which may happen multiple times in a single game session.
Syntax
Event OnLoad()
Parameters
None.
Examples
Event OnLoad()
Debug.Trace("This object is loaded, playing animations should work now")
endEvent
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 the OnCellAttach Event instead.