Owner Struct - InstanceData

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

F4SE Struct of: InstanceData Script
Requires F4SE version 0.3.1 or higher.

A structure that holds information about an object.

Syntax[edit | edit source]

Struct Owner
  Form owner
  int slotIndex
EndStruct

Members[edit | edit source]

Examples[edit | edit source]

; Getting an Owner from the Player
InstanceData:Owner thisInstance = Game.GetPlayer().GetInstanceOwner(41)
Debug.Trace(thisInstance.Owner)     ; Player
Debug.Trace(thisInstance.slotIndex) ; 41


; Getting an Owner using an Object Reference
InstanceData:Owner thisInstance = new InstanceData:Owner
thisInstance.Owner = self as ObjectReference
Debug.Trace(thisInstance.Owner)

See Also[edit | edit source]