Difference between revisions of "OnCellLoad - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Egocarib
m
imported>Egocarib
 
(One intermediate revision by the same user not shown)
Line 23: Line 23:
== Notes ==
== Notes ==
*This event will NOT fire in the first cell(s) loaded while loading from a save game.  
*This event will NOT fire in the first cell(s) loaded while loading from a save game.  
*This appears to be the only event that can be placed in a [[ReferenceAlias Script|ReferenceAlias]] script attached to a Player Alias that will actually fire when the player loads into a new cell. However, it is not completely reliable -- see the note below:
*This appears to be the only event that can be placed in a [[ReferenceAlias Script|ReferenceAlias]] script attached to a Player Alias that can be used to detect when the player loads into a new cell. However, it is not completely reliable -- see the note below:
*This event will only fire when entering a cell that is not already loaded in memory. The game keeps many recently visited cells loaded in memory, so it can be unpredictable whether this event will fire. Even when traveling through a load door with a load screen, the cell arrived at may still be loaded if it was visited during this play session, and this event might not fire.
*This event will only fire when entering a cell that is not already loaded in memory. The game keeps many recently visited cells loaded in memory, so it can be unpredictable whether this event will fire. Even when traveling through a load door with a load screen, the cell arrived at may still be loaded if it was visited during this play session, and this event might not fire.
*One alternative way to track every cell change the player makes is described [[Detect_Player_Cell_Change_(Without_Polling)|here]].


== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[OnLoad - ObjectReference]]
*[[OnLoad - ObjectReference]]
*[[OnUnload - ObjectReference]]
*[[OnUnload - ObjectReference]]
*[[OnCellAttach - ObjectReference]]
*[[OnCellDetach - ObjectReference]]

Latest revision as of 09:05, 25 April 2014

Member of: ObjectReference Script

Event called when every object's 3d in this object's parent cell loaded and ready. At this point you should be able to animate these objects, or manipulate them in other ways without issues. This event is sent every time the cell is loaded, which may happen multiple times in a single game session.

Syntax[edit | edit source]

Event OnCellLoad()

Parameters[edit | edit source]

None.

Examples[edit | edit source]

Event OnCellLoad()
  Debug.Trace("Every object in this cell has loaded its 3d")
endEvent

Notes[edit | edit source]

  • This event will NOT fire in the first cell(s) loaded while loading from a save game.
  • This appears to be the only event that can be placed in a ReferenceAlias script attached to a Player Alias that can be used to detect when the player loads into a new cell. However, it is not completely reliable -- see the note below:
  • This event will only fire when entering a cell that is not already loaded in memory. The game keeps many recently visited cells loaded in memory, so it can be unpredictable whether this event will fire. Even when traveling through a load door with a load screen, the cell arrived at may still be loaded if it was visited during this play session, and this event might not fire.
  • One alternative way to track every cell change the player makes is described here.

See Also[edit | edit source]