Page 1 of 1
Rsponse panel for a NPC?
Posted: Fri Nov 09, 2018 11:03 am
by forrestuv
Is there a way to show a response panel even if the actor or conversant are not players?
thx
Re: Rsponse panel for a NPC?
Posted: Fri Nov 09, 2018 11:54 am
by Tony Li
The easiest way is to make a copy of the actor, and set its
Is Player checkbox true. Assign it to the response nodes. You can make it look just the non-player copy of the actor by using the same Display Name and portrait image(s).
Alternatively, you could temporarily set the original actor's Is Player field to true at runtime. For example, in C#:
Code: Select all
DialogueLua.SetActorField("Some Actor", "Is Player", true);
If you want to get deep under the hood, you could create a new ConversationState object and call DialogueManager.conversationController.GotoState(state). I'll only get into those weeds if you tell me that's the way you want to go.
Re: Rsponse panel for a NPC?
Posted: Fri Nov 09, 2018 12:53 pm
by forrestuv
thx
also, is there a particular reason why DialogueEntry has ActorID and ConversantID always = 1 ?
(same if I query the DB DialogueManager.instance.MasterDatabase.GetDialogueEntry)
The DialogueEntry Actor and Conversant are configured properly in the editor.
Re: Rsponse panel for a NPC?
Posted: Fri Nov 09, 2018 1:35 pm
by forrestuv
Interesting..it only happens on a specific (long) Entry ...mmmm
Re: Rsponse panel for a NPC?
Posted: Fri Nov 09, 2018 1:44 pm
by forrestuv
Nevermind..It was the backup db selected that had the same entry with wrong Actor/Conversant ID all set to 1 (odd btw)
Re: Rsponse panel for a NPC?
Posted: Fri Nov 09, 2018 1:45 pm
by Tony Li
Glad to hear it's okay now. Maybe at one point someone had set the conversation's actor and conversant to the same value.