DanL2mx Posted March 6, 2013 Share Posted March 6, 2013 Hi all. :biggrin: I'm making a Custom Forsworn Follower that lives in the Druadach Redoubt, however I only want to be able to recruit her IF the player helps Madanach (sides with the Forsworn) in the "No One Escapes Cidhna Mine" quest. Is there a Script that can help me change the Custom Follower's Relationship Level to the player to ALLY only IF they did the aforementioned quest? Link to comment Share on other sites More sharing options...
hfiani Posted March 6, 2013 Share Posted March 6, 2013 {actor}.SetRelationshiprank(Game.GetPlayer(), 3)Game.GetPlayer().SetRelationshiprank({actor}, 3) and you should add the dialogues that allows you to get her as a follower Link to comment Share on other sites More sharing options...
hfiani Posted March 6, 2013 Share Posted March 6, 2013 by the way, in the dialogue, you put the follower part: "follow me i need your help" and set a condition on it so it is only activated when the quest is done OR check the relationship with their leader. if it is set as ally means she is too good luck Link to comment Share on other sites More sharing options...
DanL2mx Posted March 6, 2013 Author Share Posted March 6, 2013 {actor}.SetRelationshiprank(Game.GetPlayer(), 3)Game.GetPlayer().SetRelationshiprank({actor}, 3) and you should add the dialogues that allows you to get her as a follower First off, thanks for the help! Actually I wanted to add the script to a trigger inside the Redoubt, here is the idea for the script (it's pretty basic since I'm new to scripting): EVENT onTriggerEnter (objectReference triggerRef) Actor actorRef = triggerRef as Actor if (actorRef == game.GetPlayer()) Debug.MessageBox("Player in the Zone!") if (insert code to get druadach's faction OR madanach's relationship level to the player lol) Debug.MessageBox("Madanach Ally") {actor}.SetRelationshiprank(Game.GetPlayer(), 3) Game.GetPlayer().SetRelationshiprank({actor}, 3) endif gotoState ("hasBeenTriggered") endif endEVENT STATE hasBeenTriggered ; do nothing endSTATE As you can see I still need to be able to get the faction's relationship level, also I'm not sure this is the best approach regarding when to trigger the script. I'm open to suggestions. Link to comment Share on other sites More sharing options...
hfiani Posted March 7, 2013 Share Posted March 7, 2013 first you need to pass your actors as parameters to the script. means Actor Property madanach Autoand where you have put the script you double click on the script to give "madanach" the correct actor. inside the "if" you can put: if (madanach.GetRelationshipRank(Game.GetPlayer()) >= 1) Link to comment Share on other sites More sharing options...
DanL2mx Posted March 7, 2013 Author Share Posted March 7, 2013 Well I finally got a fully working version of my simple script. Thanks again for the help, I'll post the code here in case it can be of help for someone else. Actor Property AoS_Rayne Auto Faction Property AoS_DruadachFaction Auto EVENT onTriggerEnter (objectReference triggerRef) Actor actorRef = triggerRef as Actor if (actorRef == game.GetPlayer()) Debug.MessageBox("Player in the area!") if (AoS_Rayne.IsDead() == false) ;Check if Rayne is ALIVE Debug.MessageBox("Rayne is ALIVE") if (game.GetPlayer().GetFactionRank(AoS_DruadachFaction) >= 0) ;Check if PLAYER is a member of the Druadach Redoubt's Faction ; Player is in the Druadach Redoubt's Faction Debug.MessageBox("Player is in the Druadach Redoubt's Faction! Setting Rayne to ALLY") AoS_Rayne.SetRelationshipRank(Game.GetPlayer(), 3) game.GetPlayer().SetRelationshipRank(AoS_Rayne, 3) else ; Player is NOT in the Druadach Redoubt's Faction! Set Rayne to enemy! Debug.MessageBox("Player is NOT in the Druadach Redoubt's Faction! Setting Rayne to ENEMY") AoS_Rayne.SetRelationshipRank(Game.GetPlayer(),-3) game.GetPlayer().SetRelationshipRank(AoS_Rayne, -3) endif else ;Rayne is DEAD Debug.MessageBox("Rayne is DEAD") endif gotoState ("hasBeenTriggered") endif endEVENT STATE hasBeenTriggered ; do nothing endSTATE Out of curiosity. If the player marries the NPC and enters the trigger area again, will setting the Relationship Rank to ally affect the marriage? Link to comment Share on other sites More sharing options...
hfiani Posted March 8, 2013 Share Posted March 8, 2013 (edited) the marriage it means that the relationship rank is set to 4 means yes it will affect. you can always check if it is set to 4, and then do not set it to 3. else set it to 3 Edited March 8, 2013 by hfiani Link to comment Share on other sites More sharing options...
Tsewe Posted March 19, 2013 Share Posted March 19, 2013 Hi everyoneI see fit to enter a small request in this thread: I am trying to do the opposite; my NPC follower is set as an Ally, and I want him to become an enemy when the player tells him something. what could be the script for such action? Link to comment Share on other sites More sharing options...
Recommended Posts