Background for Fallout 4
Member of the ObjectReference script
voidfunctionSetActorOwner(ActorBaseakActorBase, boolabNoCrime=false)Native

Description

Wiki Description

Sets the actor base as the owner of this object.

Documentation Comment

Sets this object's owner to the specified actor base - None means to remove ownership


Caveats


Parameters

ActorBaseakActorBase

CK Wiki Description

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

boolabNoCrime=false

CK Wiki Description

If true, taking this item is not considered a crime despite ownership.

  • Default:False

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())
; Make Bob the owner of the sword, but it's not a crime if anyone else takes it.
SwordProperty.SetActorOwner(Bob.GetActorBase(), true)

Auto-Generated Example

ActorBase myActorBase__akActorBase
bool myBool__abNoCrime

myObjectReference__toCallFunctionOn.SetActorOwner(myActorBase__akActorBase, myBool__abNoCrime)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.