Jump to content

Recommended Posts

Posted (edited)

If I want to write a script that does the following;

  1. Checks to see if the player has completed the quest.
  2. 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)

endif

EndEvent

 

----------------------------------------------------------------------------------------------------------------------------------------

 

Obviously that doesn’t work, but am I on the right track?
Where have I gone wrong? etc, etc.

Thanks. :smile:

 

~ChaChaLoco

Edited by ChaChaLoco
Posted

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.

Posted

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)

 

Posted

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.

  • Recently Browsing   0 members

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