Talk:SetActorOwner - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

Here's an example of how to transfer ownership of an animal to the Player (and make them an animal companion):

Actor Property GDSBFFDog Auto
Int PRoperty Cost Auto

Function BuyGDSBFFDog()
  Game.GetPlayer().RemoveItem(Gold, Cost)
  GDSBFFDog.SetActorOwner(Game.GetPlayer().GetActorBase())
  (pDialogueFollower as DialogueFollowerScript).SetAnimal(GDSBFFDog)
EndFunction

--Sollar 15:18, 11 June 2012 (EDT)