Mod:Creation Kit/SetActorOwner - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Sets the actor base as the owner of this object.

Syntax
Function SetActorOwner(ActorBase akActorBase, bool abNoCrime = false) native

Parameters

 * akActorBase: The ActorBase 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.SetActorOwner(NONE) SwordProperty.SetActorOwner(Game.GetPlayer.GetActorBase) SwordProperty.SetActorOwner(Bob.GetActorBase) SwordProperty.SetActorOwner(Bob.GetActorBase, true)
 * Clear ownership on the sword, which allows the player to take it without stealing it
 * Set the player as the owner of the sword (other actors will "steal" it)
 * Make Bob the owner of the sword
 * Make Bob the owner of the sword, but it's not a crime if anyone else takes it.