Difference between revisions of "OnEquipped - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
 
imported>Tunaisafish
(→‎Notes: native functions -> Member Functions)
Line 24: Line 24:


== Notes ==
== Notes ==
*When an object is equipped it is inside a container, which means that you cannot call native functions on it. (Unless it is a persistent reference)
*When an object is equipped it is inside a container, which means that you cannot call Member Functions on it. (Unless it is a persistent reference)


== See Also ==
== See Also ==

Revision as of 05:59, 25 March 2012

Member of: ObjectReference Script

Event called when the object reference has been equipped by an actor.

Syntax

Event OnEquipped(Actor akActor)

Parameters

  • akActor: The actor that equipped this object.

Examples

Event OnEquipped(Actor akActor)
  if akActor == Game.GetPlayer()
    Debug.Trace("We were equipped by the player!")
  endIf
endEvent

Notes

  • When an object is equipped it is inside a container, which means that you cannot call Member Functions on it. (Unless it is a persistent reference)

See Also