Hey guys! I'm making a mod that allows the player to view the NPC's current stats via dialogue.
I'm new to scripting so I want to know how you can make a function that executes on the NPC which is currently speaking to the Player.
For example:
The syntax for the getrelationshiprank function is:
int Function GetRelationshipRank(Actor akOther) native
An example of the script in use from the website is:
; Does the daedra like the player?
if daedra.GetRelationshipRank(Game.GetPlayer()) >= 1
Debug.Trace("Daedra likes the player")
endIf
I want to know how to make the function work on the NPC currently in dialogue with the Player.
For example:
If the Player is in dialogue with "Delphine", I want the function to get the relationship rank between Delphine and the Player.
Or if the Player is in dialogue with "Aela The Huntress", I want to the function to retrieve the relationship rank between Aela and the Player.
Basically, the NPC which is in dialogue with the player and NOT just a specific actor.