ChaChaLoco Posted March 4, 2013 Posted March 4, 2013 (edited) If I want to write a script that does the following;Checks to see if the player has completed the quest. If the above passes, adds the Faction "PotentialFollowerFaction" (rank 0) to the NPC using his Alias in the quest.How would I do that? Something like; ---------------------------------------------------------------------------------------------------------------------------------------- Event if (GetOwningQuest.GetQuestCompleted == 1) Alias_MyNPC.GetReference().AddFac(PotentialFollowerFaction, 0) endifEndEvent ---------------------------------------------------------------------------------------------------------------------------------------- Obviously that doesn’t work, but am I on the right track?Where have I gone wrong? etc, etc.Thanks. :smile: ~ChaChaLoco Edited March 4, 2013 by ChaChaLoco
ChaChaLoco Posted March 4, 2013 Author Posted March 4, 2013 Also, as an aside, as he is a custom NPC with his own dialogue and his own story, etc, I'm looking for a way to make all the necessary follower dialogue for him so he can actually become a follower.Just wanted to get this script out of the way first.Is there any such way, or a guide perhaps?Thanks again.
Ghaunadaur Posted March 4, 2013 Posted March 4, 2013 On the Quest Stages tab of your quest, add a new property for the faction you want to add to the NPC. In the papyrus section of the last stage (the stage that completes the quest), write the following line of code: Alias_MyNPC.GetActorRef().AddToFaction(PotentialFollowerFaction) For setting the rank, the funcion SetFactionRank() can be used: Alias_MyNPC.GetActorRef().SetFactionRank(PotentialFollowerFaction, 0)
ChaChaLoco Posted March 5, 2013 Author Posted March 5, 2013 Ha! I think it worked, thanks very much! Papyrus is a strange and foreign language to me, despite reading through a few tutorials on it.
Recommended Posts