Jump to content

.setoutfit() function through dialogue


Recommended Posts

Attempting to make an option to change NPC outfit through dialogue. It should be something like:

 

Player: "I need you to adjust equipment loadout."

NPC: "Which loadout should I use?"

Player: "Loadout A" / "Loadout B" / "Loadout C"

 

And I want to attach script to player's choice that would change outfit.

 

I am rather new to papyrus and bad at programming in general and there are no good tutorials or examples on .SetOutfit() function or specifically how to apply it through dialogue (instead of by casting a spell or OnLoad or anything else that won't help my cause), therefore I need some assistance with making a script that would do it. So far I took a look at blades recruitment script as an example, but it is not attached to dialogue topic or response.

 

Thus far I was trying to do it as follows:

ScriptName OutfitAScript extends Quest

Outfit Property OutfitA Auto
ReferenceAlias Property MyNPCQuestAlias Auto

Function EquipOutfitA (Actor MyNPCQuestAlias)

	MyNPCQuestAlias.SetOutfit(OutfitA)

EndFunction

But I have doubts if I am doing it correctly.

 

What should I add or remove and is it correct way at all?

Am I defining outfit and NPC correctly?

Is using quest alias for desired NPC the right way to get this script apply to him/her, or should I do something else?

 

Could anyone give me an example, how it should be done?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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