Background for Fallout 4
Member of the Actor script
intfunctionGetRelationshipRank(ActorakOther)Native

Description

Wiki Description

Gets the relationship rank between this actor and another.

Documentation Comment

Obtains the relationship rank between this actor and another


Caveats

CK Wiki - Notes

Relationship data is NOT stored for Templated Actors, and any scripts that would set relationship data on a Templated actor will get wiped once your game session is over (which obviously has bad implications for Save/Load).


Parameters

ActorakOther

CK Wiki Description

The other actor to determine our relationship with.


Examples

; Does the daedra like the player?
if daedra.GetRelationshipRank(Game.GetPlayer()) >= 1
  Debug.Trace("Daedra likes the player")
endIf
; calling GetRelationshipRank on a follower (such as obtained by Game.GetPlayerFollowers()) may fail (return 0) unless they are cast as CompanionActorScript.
; casting as CompanionActorScript will work because it extends Actor. In contrast, casting as FollowerScript won't work because it extends Quest.
CompanionActorScript myCompanion = myFollower as CompanionActorScript
if myCompanion && myCompanion.GetRelationshipRank(Game.GetPlayer()) == 4
  Debug.Trace("The companion is the player's lover")
endIf

Auto-Generated Example

Actor myActor__akOther

int returnedValue = myActor__toCallFunctionOn.GetRelationshipRank(myActor__akOther)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.