Allowing 2 NPC's to talk

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Allowing 2 NPC's to talk

Post by soniclinkerman »

Hey!

Just a quick question on how to make NPC's talk to each other in this format
issue5.png
issue5.png (639.77 KiB) Viewed 662 times
As of right now, when it plays, it only uses a single Text panel like this:
issue6.png
issue6.png (645.03 KiB) Viewed 662 times
issue7.png
issue7.png (615.91 KiB) Viewed 662 times
These were taken right after each other when you push the continue button.

I'd like it so when one character talks, it highlights on the right and the other highlights on the right when they are talking.
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Allowing 2 NPC's to talk

Post by Tony Li »

Hi,

Examine how the VN Template Standard Dialogue UI prefab is set up. It has 3 subtitle panels. They all use the same text element, but they use different portrait images. Panel 0 = right, panel 1 = left, panel 2 = middle.

If you want an NPC to talk in panel 1 (left), add a Dialogue Actor component to its GameObject. Set the Actor dropdown to the NPC actor. Set Dialogue UI Settings > Subtitle Panel Number to Panel 2.

Note: You can also use the [panel=#] markup tag to show a dialogue entry in a specific panel, or the SetPanel() sequencer command to change the panel that an actor uses.
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Allowing 2 NPC's to talk

Post by soniclinkerman »

I added a dialogue actor to subtitle panel 1, but it's still failing to actually put that specific npc there

Here are my settings:
issue1.png
issue1.png (78.06 KiB) Viewed 651 times
Also my Standard Dialogue UI section.
issue2.png
issue2.png (119.87 KiB) Viewed 651 times
For some reason, when the dialogue starts, the subtitle 1 panel turns itself off.
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Allowing 2 NPC's to talk

Post by Tony Li »

Hi,

Subtitle panels will stay inactive until they're needed, unless Visibility is set to Always From Start.

Make sure to assign the Standard Dialogue UI component's Default NPC Subtitle Panel field. It looks like it might have been accidentally unassigned. It should probably be the default value of Subtitle Panel 0.

Did you put the Dialogue Actor component on the NPC GameObject? (Not the subtitle panel GameObject.)

See also: Character GameObject Assignments

It's possible that the GameObject you expect isn't being used for the NPC(s).
soniclinkerman
Posts: 82
Joined: Wed Mar 31, 2021 6:48 pm

Re: Allowing 2 NPC's to talk

Post by soniclinkerman »

Ah ok. I originally had dialogue actor part of the subtitle Gameobject.

What I did was put it on a separate Gameobject and add changed the subtitle panel setting on that gameobject to it's respective panel. So far it's working.

Thanks a ton for the help!
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Allowing 2 NPC's to talk

Post by Tony Li »

Glad to help!
Post Reply