Using multiple dialogue prefabs

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
nuttaphoom
Posts: 10
Joined: Wed Jan 10, 2024 3:24 am

Using multiple dialogue prefabs

Post by nuttaphoom »

for my game, I need different kind of dialogues to be displayed depending on the type of conversation that taken place.
For most cases, I will use my default dialogues box for general conversation.
Screenshot 2024-02-14 111344.png
Screenshot 2024-02-14 111344.png (224.37 KiB) Viewed 141 times
Screenshot 2024-02-14 111833.png
Screenshot 2024-02-14 111833.png (44 KiB) Viewed 141 times
but for other cases, I might want to use something like this.
Screenshot 2024-02-14 111632.png
Screenshot 2024-02-14 111632.png (82.62 KiB) Viewed 141 times
My question is that how can I achieve something like this ? I'm thinking of creating a function that would replace the old dialogue box prefab with new one but I'm not sure how to do so
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Using multiple dialogue prefabs

Post by Tony Li »

Hi,

The easiest way is to make both UIs into subtitle panels in the same dialogue UI. Set their Visibility dropdowns to Until Superceded. Assign your default UI as the Default NPC Subtitle Panel and Default PC Subtitle Panel (e.g., panel 0).

When you actor(s) to use the alternate subtitle panel (e.g., panel 1), include "[panel=1]" in Dialogue Text or use the SetPanel(actorName, 1) sequencer command.
Post Reply