SetActorOwner - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

Sets the actor base as the owner of this object.

Syntax

Function SetActorOwner(ActorBase akActorBase) native

Parameters

  • akActorBase: The ActorBase to set as this object's owner. If None, will clear ownership.

Return Value

None.

Examples

; Clear ownership on the sword, which allows the player to take it without stealing it
SwordProperty.SetActorOwner(NONE)


; Set the player as the owner of the sword (other actors will "steal" it)
SwordProperty.SetActorOwner(Game.GetPlayer().GetActorBase())


; Make Bob the owner of the sword
SwordProperty.SetActorOwner(Bob.GetActorBase())

See Also