SetActorRefOwner - ObjectReference
Member of: ObjectReference Script
Sets a specific Actor (that is to say, an Actor reference, not an ActorBase) as the owner of this object.
SyntaxEdit
Function SetActorRefOwner(Actor akActor, bool abNoCrime = false) native
ParametersEdit
- 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 ValueEdit
None.
ExamplesEdit
; Clear ownership on the sword, which allows the player to take it without stealing it
SwordProperty.SetActorRefOwner(NONE)
; Set the Actor in NewOwnerProperty as the owner of the sword (other actors will "steal" it)
SwordProperty.SetActorRefOwner(NewOwnerProperty)
; Set the Actor in NewOwnerProperty as the owner of the sword, but it's not a crime if anyone else takes it.
SwordProperty.SetActorRefOwner(NewOwnerProperty, true)