Jump to content

[LE] Help needed with SetRelationshipRank script


Recommended Posts

Hey!

 

So, I'm making a small dialogue extention mod for Teldryn Sero, and I wanted to set his disposition to 4 via dialogue. My plan was to add a script to a line of dialogue, so when the player chooses the right answer, the relationship rank would change from 3 to 4. My problem is, I can't seem to make it work. Now, please note that I'm totally new to scripting, and my understanding is very limited on the matter, that's why I'd have liked to keep it as simple as possible.

 

Here's the first script:

Scriptname TeldrynXtra1 extends Quest

;BEGIN ALIAS PROPERTY DLC2FollowerAlias
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_DLC2FollowerAlias Auto
;END ALIAS PROPERTY

;BEGIN FRAGMENT Fragment_1
Function Fragment_1()
;BEGIN CODE
Alias_DLC2FollowerAlias.GetActorReference ().SetRelationshipRank(Game.GetPlayer(), 4)
Debug.Notification("Teldryn loves you")
Stop()
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment

It compiles without any problems, I set the properties, hit ok, save esp and go in game to check, but it's not working. I have no idea what I'm missing and I've spend the last few weekends googling away, with no success as well as looking at vanilla scripts and on this forum. I made 1 more script that compiles, but again, doesn't work in game.

 

Script 2:

Scriptname TeldrynXtra2 extends TopicInfo
{Relationship rank change}

;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
akSpeaker.SetRelationshipRank(Game.GetPlayer(), 4)
Debug.Notification("Teldryn loves you")
;END CODE
EndFunction
;END FRAGMENT

 

I honestly have no idea what to do, so if anyone can point me in the right direction, I'll forever be in their debt. Thanks in advance.

Link to comment
Share on other sites

I created the scripts manually via [new script] when you add scripts to things. I don't know how to create automatic scripts.

It's attached like this: https://imgur.com/ejlHmNx but now I see there are 2 other windows right next to it. I presume that is an issue and the code needs to be put there?

 

Actually, I went ahead and did that, like this: https://imgur.com/X8mNug9 Compiled. I'll check in game real quick.

 

Edit:

Foamyesque, my eternal gratitude is yours! It's working! :D Thank you for your help!

https://imgur.com/oYLBfMN

https://imgur.com/O3wGRDR

Edited by AlitaHelms
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...