GetActorOwner - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Gets the ActorBase that owns this object. Will return None if the object isn't owned by an actor.

Caution! If the owner of this object is a specific Actor (a reference rather than an ActorBase), this function will still return the ActorBase for that Actor. To determine whether this object is owned by a specific actor or an ActorBase, check GetActorRefOwner first. If that returns None, only then should you check this function.

Syntax[edit | edit source]

ActorBase Function GetActorOwner() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

The ActorBase that owns this object.

Examples[edit | edit source]

; Does the player own the sword?
bool playerOwnsSword = (SwordProperty.GetActorOwner() == Game.GetPlayer().GetActorBase())

See Also[edit | edit source]