SetActorRefOwner - ObjectReference
Jump to navigation
Jump to search
Member of: ObjectReference Script
Sets a specific Actor (that is to say, an Actor reference, not an ActorBase) as the owner of this object.
Syntax[edit | edit source]
Function SetActorRefOwner(Actor akActor, bool abNoCrime = false) native
Parameters[edit | edit source]
- 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[edit | edit source]
None.
Examples[edit | edit source]
; 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)