OnReset - ObjectReference

From the CreationKit Wiki
Revision as of 18:12, 7 December 2013 by imported>Arthmoor (Corrected the contradictory information regarding Quests and Aliases since OnReset is NOT a member of either of these.)
Jump to navigation Jump to search

Member of: ObjectReference Script

Event called when the object is reset.

Syntax

Event OnReset()

Parameters

None.

Examples

Event OnReset()
  Debug.Trace("This object was reset")
endEvent

Notes

  • Your script's data has already been reset by the time you receive this event (and your OnInit has been run), so if you need to retain any information between Resets, you need to store the information somewhere else.
  • Aliases receive this event since it targets the ObjectReference a ReferenceAlias points to.
  • Any event registrations that have been done before the object was reset (and before OnInit would have been called) will have been cleared.
  • This event does not block other events, functions, or properties from running (unlike OnInit).
  • Created refs never reset (i.e. refs placed via PlaceAtMe)

See Also