Mod:Creation Kit/OnActivate - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Event called when the object reference is activated.

Syntax
Event OnActivate(ObjectReference akActionRef)

Parameters

 * akActionRef: The ObjectReference that activated this reference.

Examples
Event OnActivate(ObjectReference akActionRef) Debug.Trace("Activated by " + akActionRef) EndEvent

Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer ; your code here. endif EndEvent
 * Have the event run if the triggering objectreference is the player.