Jump to content

NPC Default Clothes Redressing


kxdace

Recommended Posts

Posted

So I created a dialog quest.

Basically a simple follower system.

Pretty basic dialog option to have party members join:

Function Fragment_0(ObjectReference akSpeakerRef)

      

       Actor akSpeaker = akSpeakerRef as Actor

 

       If Alias_Holder01.GetActorReference() == None

      

             Alias_Holder01.ForceRefTo(akSpeaker)

             akSpeaker.SetPlayerTeammate()

             akSpeaker.AddToFaction(Party)

           ;debug.notification("Holder 01")

 

 

       elseIf Alias_Holder02.GetActorReference() == None

 

             Alias_Holder02.ForceRefTo(akSpeaker)

             akSpeaker.SetPlayerTeammate()

             akSpeaker.AddToFaction(Party)

           ;debug.notification("Holder 02")

This part works as expected. in the Alias_Holder properties I have a basic follower package setup.

The next part gets a bit tricky. Im trying to create a "everyone change closthes and go to this area" type of dialog where all the NPC's in my party change clothes based on body type and teleport to the party location.

 

Function Fragment_0(ObjectReference akSpeakerRef)

 

 

       Actor akSpeaker = akSpeakerRef as Actor

       Actor actI = Alias_Holder01.GetActorReference()

       Actor actII = Alias_Holder02.GetActorReference()  

       Alias_Party01.ForceRefTo(actI)

       Alias_Party02.ForceRefTo(actII)

       actI.SetPlayerTeammate(false)

       actII.SetPlayerTeammate(false)

       actI.MoveTo(markBBQ)

       actII.MoveTo(markBBQ)

       ChangeClothes(actI)

       ChangeClothes(actII)

 

            

EndFunction

 

 

 

 

Function ChangeClothes(Actor ActC)

 

             if(actC.GetFactionRank(unpFaction) == 0)

 

                           actC.setOutfit(selOutfit01UNP)

 

             elseIf(actC.GetFactionRank(cbbeFaction) == 0)

      

                           actC.setOutfit(SelOutfit01CBBE)

             else

                           debug.notification("The actor is not in either faction")

 

             endIf

 

endFunction

 

       ReferenceAlias Property  Alias_Holder01 Auto

       ReferenceAlias Property  Alias_Holder02 Auto

       ReferenceAlias Property  Alias_Party01 Auto

       ReferenceAlias Property  Alias_Party02 Auto

       ObjectReference Property markBBQ  Auto

       Outfit Property selOutfit01UNP  Auto

       Outfit Property selOutfit01CBBE  Auto

       Outfit Property selOutfit02UNP  Auto

       Outfit Property selOutfit02CBBE  Auto

       Faction Property unpFaction Auto

      Faction Property cbbeFaction Auto

 

This all works great now the problem comes when dismissing them.

What is the best way to make them change back to their default outfits?

The only reliable way I have found is to kill the actor and spawn a new version of them but there has to be a better way than that.

Any code snippit out there that will help?

Like get all clothes from target NPC and store them in a array type deal?

Sorry in advanced, my programming skills suck

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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