Background for Skyrim SE
Member of the Actor script
voidfunctionMakePlayerFriend()

Description

Wiki Description

Convenience function that makes the actor a friend of the player, if allowed.

Documentation Comment

this function will make an actor a friend of the player if allowed


Caveats

CK Wiki - Notes

  • If the actor is unique and relationship rank with player = 0, raises it to 1. Otherwise does nothing.

Examples

; Make Bob a friend of the player
Bob.MakePlayerFriend()
Function MakePlayerFriend()
        Actor Player = Game.GetPlayer() ; let's call GetPlayer() only one time.
    ActorBase myBase = GetActorBase()
    if myBase.IsUnique()
        if GetRelationshipRank(Player)== 0
            SetRelationshipRank(Player, 1)
        else
        endif
    else
    endif
endFunction

Auto-Generated Example

myActor__toCallFunctionOn.MakePlayerFriend()

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.