Difference between revisions of "GetHighestRelationshipRank - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Dooge
imported>Dooge
Line 40: Line 40:


== Comments ==
== Comments ==
Seems like it does not take into account changes made in-game to NPCs, returns vanilla states for NPCs but when ran on player, takes into account any changes.
This function does not take into account changes made during run time.
 
  actor akRef = "NPC from a mod"
                                                                ; Debug.MessageBox results
  string A = akRef.GetHighestRelationshipRank() + "\n"          ; 0
  string B = akRef.GetRelationshipRank(PlayerRef) + "\n"        ; 0
  string C = PlayerRef.GetHighestRelationshipRank() + "\n"      ; 3
  string D = PlayerRef.GetRelationshipRank(akRef)  + "\n"        ; 0
 
  akRef.SetRelationshipRank(PlayerRef, 4)
  PlayerRef.SetRelationshipRank(akRef, 4)
 
  string E = akRef.GetHighestRelationshipRank() + "\n"          ; 0
  string F = akRef.GetRelationshipRank(PlayerRef) + "\n"        ; 4
  string G = PlayerRef.GetHighestRelationshipRank() + "\n"      ; 3
  string H = PlayerRef.GetRelationshipRank(akRef)  + "\n"      ; 4
 
  Debug.MessageBox(A+B+C+D+"*\n"+E+F+G+H)

Revision as of 06:05, 15 July 2015

Member of: Actor Script (Papyrus)

Gets the highest relationship rank this actor has.

Syntax

int Function GetHighestRelationshipRank() native

Parameters

None.

Return Value

The highest relationship rank this actor has.

The following values are returned:

  • 4: Lover
  • 3: Ally
  • 2: Confidant
  • 1: Friend
  • 0: Acquaintance
  • -1: Rival
  • -2: Foe
  • -3: Enemy
  • -4: Archnemesis

Examples

; Get Alice's highest relationship rank
int bestRelationship = Alice.GetHighestRelationshipRank()

See Also

Comments

This function does not take into account changes made during run time.

 actor akRef = "NPC from a mod"
                                                                ; Debug.MessageBox results
 string A = akRef.GetHighestRelationshipRank() + "\n"           ; 0
 string B = akRef.GetRelationshipRank(PlayerRef) + "\n"         ; 0
 string C = PlayerRef.GetHighestRelationshipRank() + "\n"       ; 3
 string D = PlayerRef.GetRelationshipRank(akRef)  + "\n"        ; 0
 
 akRef.SetRelationshipRank(PlayerRef, 4)
 PlayerRef.SetRelationshipRank(akRef, 4)
 
 string E = akRef.GetHighestRelationshipRank() + "\n"           ; 0
 string F = akRef.GetRelationshipRank(PlayerRef) + "\n"         ; 4
 string G = PlayerRef.GetHighestRelationshipRank() + "\n"       ; 3
 string H = PlayerRef.GetRelationshipRank(akRef)   + "\n"       ; 4
 
 Debug.MessageBox(A+B+C+D+"*\n"+E+F+G+H)