Background for Skyrim SE
Member of the ObjectReference script

Description

Wiki Description

Event called when this reference's parent cell is attached.

Documentation Comment

Event received when this object's parent cell is attached


Caveats

CK Wiki - Notes

  • This event seems to be reliably called before ObjectReference.OnCellLoad().
  • This event will NOT fire in the first cell(s) loaded while loading from a save game.
  • For notes on the meaning of attachment, see the talk page.
  • This event will NOT ever fire if used in a Player Alias script. The only cell attachment-related event that the Player seems to trigger is ObjectReference.OnCellLoad()
  • However, if you want to use this to track the player that is involved in a quest(not as an alias) you can make an xmarker and place it in the cell where you expect the player to be and attach a script containing this event, and check against the cell the player is in. This will work in conjunction with ObjectReference.OnCellDetach().
  • This event fires before ObjectReference.OnReset().
  • This event will fire for disabled objects.

Examples

Event OnCellAttach()
  Debug.Trace("Our parent cell has attached")
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends ObjectReference

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