Talk:SetPlayerTeammate - Actor
Revision as of 13:51, 6 February 2013 by imported>Cscottydont
This sample is right out of DialogueFollowerScript and shows setting a follower, which uses the SetPlayerTeammate function in real use:
Function SetFollower(ObjectReference FollowerRef) actor FollowerActor = FollowerRef as Actor FollowerActor.RemoveFromFaction(pDismissedFollower) If FollowerActor.GetRelationshipRank(Game.GetPlayer()) < 3 && FollowerActor.GetRelationshipRank(Game.GetPlayer()) >= 0 FollowerActor.SetRelationshipRank(Game.GetPlayer(), 3) EndIf FollowerActor.SetPlayerTeammate() pFollowerAlias.ForceRefTo(FollowerActor) pPlayerFollowerCount.SetValue(1) EndFunction
--Sollar 12:38, 13 June 2012 (EDT)
Caveat to #4 - it seems kills as well as crimes are attributed to the player. In OnDeath/OnDying events where akKiller should be the teammate, it is actually the player.
Cscottydont (talk) 2013-02-06T13:51:36 (EST)