Page 1 of 1
Creating a Dialogue UI with multiple NPC positions
Posted: Sun Sep 29, 2019 1:50 pm
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?
Re: Creating a Dialogue UI with multiple NPC positions
Posted: Sun Sep 29, 2019 2:15 pm
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.
Re: Creating a Dialogue UI with multiple NPC positions
Posted: Sun Sep 29, 2019 2:56 pm
by sentendo
it works! thank you very much for the quick answer.
Re: Creating a Dialogue UI with multiple NPC positions
Posted: Sun Sep 29, 2019 3:59 pm
by Tony Li
You're welcome! Happy to help.