Creating a Dialogue UI with multiple NPC positions

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
sentendo
Posts: 15
Joined: Sun Sep 29, 2019 1:38 pm

Creating a Dialogue UI with multiple NPC positions

Post by sentendo »

I would like to create a new Dialogue UI to have multiple NPC positions. The ideal thing would be to set up a variable or something in the proper db and then have it. Where should I start? Any suggestion?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a Dialogue UI with multiple NPC positions

Post by Tony Li »

Hi,

Each NPC position is called a subtitle panel. The prefabs generally have one NPC subtitle panel and one PC subtitle panel. You may want to start with a prefab, such as the Basic Standard Dialogue UI. Copy the NPC subtitle panel, move the copy where you want, and assign it to the dialogue UI's Standard Dialogue UI component > Conversation UI Elements > Subtitle Panels list. It will have an element number (0, 1, 2, etc.). This is its panel number.

If you want an NPC to use a different NPC subtitle panel, add a Dialogue Actor component to the NPC's GameObject. Set Dialogue UI Settings > Subtitle Panel Number to the panel number.

You can also use a specific panel for a single dialogue entry by adding a [panel=#] markup tag to the entry's Dialogue Text.

If you want to change an NPC's panel for the duration of the conversation, use the SetPanel() sequencer command.
sentendo
Posts: 15
Joined: Sun Sep 29, 2019 1:38 pm

Re: Creating a Dialogue UI with multiple NPC positions

Post by sentendo »

it works! thank you very much for the quick answer.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a Dialogue UI with multiple NPC positions

Post by Tony Li »

You're welcome! Happy to help.
Post Reply