Page 1 of 1

How do I show a different UI for a particular conversation?

Posted: Sat Feb 01, 2020 10:16 pm
by rakkar
I'm trying to show a different UI for a particular conversation, but can't figure out how to get it to work, even with a debugger.

From debugging, my "Subtitle" which holds the body of the text, called parchment, gets closed, and the default "Subtitle" opens after that.

What I want is for the default one to not show up, and the parchment one to show up instead.

Settings attached

Re: How do I show a different UI for a particular conversation?

Posted: Sat Feb 01, 2020 10:17 pm
by rakkar
Result screenshot

Re: How do I show a different UI for a particular conversation?

Posted: Sun Feb 02, 2020 11:10 am
by Tony Li
Hi,

If you want to use a different entire dialogue UI (for example, the Wheel Dialogue UI instead of the Basic Standard Dialogue UI), you can use an Override Dialogue UI component on one of the participants, or set DialogueManager.dialogueUI before starting the conversation.

However, it looks like you only want to use a specific subtitle panel within a dialogue UI. Let's assume that under normal circumstances conversations use the panels named "UI_DialoguePanel NPC" and "UI_DialoguePanel PC" -- or possible the ones named "NPC Subtitle Panel" and "PC Subtitle Panel". (It doesn't matter either way for this reply.)

The dialogue UI has an additional panel named "UI_DialoguePanel FullScreenParchment" that you want to use for a particular conversation. To do so, follow these steps:

Make sure "UI_DialoguePanel FullScreenParchment" is added to the Standard Dialogue UI component's Subtitle Panels list, and make a note of its number in the list.

If the participant will always use "UI_DialoguePanel FullScreenParchment" to show its subtitles, add a Dialogue Actor component to the participant's GameObject. Set Dialogue UI Settings > Subtitle Panel Number to the panel's number in the list.

If the participant will only use "UI_DialoguePanel FullScreenParchment" for a particular conversation, and use the regular panel for other conversations, then use the SetPanel(actor, #) sequencer command at the beginning of the conversation, where actor is the actor name (e.g., Player) and # is the panel number in the list. For example:

Code: Select all

SetPanel(Player, 2)
The conversation will continue to use this panel until the conversation ends or you change it using another SetPanel() command.

Note: If you only want to show a single subtitle in "UI_DialoguePanel FullScreenParchment", you can include the markup tag [panel=#] in the Dialogue Text instead of using SetPortrait().