Background for Fallout 4
Member of the Actor script
eventOnItemEquipped(FormakBaseObject, ObjectReferenceakReference)

Description

Wiki Description

Event called when the actor equips an object.

Documentation Comment

Event received when this actor equips something - akReference may be None if object is not persistent


Caveats

CK Wiki - Notes

  • This is the event to use when wanting to detect the player using a consumable item.

Parameters

FormakBaseObject

CK Wiki Description

The base object the actor just equipped.

ObjectReferenceakReference

CK Wiki Description

The reference that the actor just equipped - if the reference is persistant. Otherwise, None.


Examples

Event OnItemEquipped(Form akBaseObject, ObjectReference akReference)
  if akBaseObject as Weapon
    Debug.Trace("This actor just equipped a weapon!")
  endIf
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends Actor

event OnItemEquipped(Form akBaseObject, ObjectReference akReference)
    Debug.trace("Event received - OnItemEquipped: akBaseObject = " + akBaseObject + " akReference = " + akReference)
endEvent

Related Pages


Additional References

View this event’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.