Background for Skyrim SE
Member of the ObjectReference script
eventOnActivate(ObjectReferenceakActionRef)

Description

Wiki Description

Event called when the object reference is activated.

Documentation Comment

Event received when this reference is activated


Caveats

CK Wiki - Notes

This event will still be received if the object reference has had its normal activation processing blocked via ObjectReference.BlockActivation(...). It is also most likely running after the object itself has done (or ignored) it's normal activation processing. Which means, for example, that if normally the object is picked up you won't be able to manipulate it as it will have already been moved into the actor's inventory.


Parameters

ObjectReferenceakActionRef

CK Wiki Description

The ObjectReference that activated this reference.


Examples

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

Auto-Generated Example

Scriptname MyCoolScript extends ObjectReference

event OnActivate(ObjectReference akActionRef)
    Debug.trace("Event received - OnActivate: akActionRef = " + akActionRef)
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.