Mod:Creation Kit/SetActorRefOwner - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Sets a specific Actor (that is to say, an Actor reference, not an ActorBase) as the owner of this object.

Syntax
Function SetActorRefOwner(Actor akActor, bool abNoCrime = false) native

Parameters

 * akActor: The Actor to set as this object's owner. If None, will clear ownership.
 * abNoCrime: If true, taking this item is not considered a crime despite ownership.
 * Default: False

Return Value
None.

Examples
SwordProperty.SetActorRefOwner(NONE) SwordProperty.SetActorRefOwner(NewOwnerProperty) SwordProperty.SetActorRefOwner(NewOwnerProperty, true)
 * Clear ownership on the sword, which allows the player to take it without stealing it
 * Set the Actor in NewOwnerProperty as the owner of the sword (other actors will "steal" it)
 * Set the Actor in NewOwnerProperty as the owner of the sword, but it's not a crime if anyone else takes it.