SetActorOwner - ObjectReference: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Jlundin
No edit summary
 
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
Function SetActorOwner(ActorBase akActorBase) native
Function SetActorOwner(ActorBase akActorBase) native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 17: Line 17:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Clear ownership on the sword, which allows the player to take it without stealing it
; Clear ownership on the sword, which allows the player to take it without stealing it
SwordProperty.SetActorOwner(NONE)
SwordProperty.SetActorOwner(NONE)
</source>
</syntaxhighlight>
<br>
<br>
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Set the player as the owner of the sword (other actors will "steal" it)
; Set the player as the owner of the sword (other actors will "steal" it)
SwordProperty.SetActorOwner(Game.GetPlayer().GetActorBase())
SwordProperty.SetActorOwner(Game.GetPlayer().GetActorBase())
</source>
</syntaxhighlight>
<br>
<br>
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Make Bob the owner of the sword
; Make Bob the owner of the sword
SwordProperty.SetActorOwner(Bob.GetActorBase())
SwordProperty.SetActorOwner(Bob.GetActorBase())
</source>
</syntaxhighlight>


== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[ObjectReference Script]]
*[[GetActorOwner - ObjectReference]]
*[[GetActorOwner - ObjectReference]]

Navigation menu