GetActorOwner - ObjectReference

From Creation Kit
Jump to: navigation, 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

ActorBase Function GetActorOwner() native

Parameters

None.

Return Value

The ActorBase that owns this object.

Examples

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

See Also