Page 1 of 1
Allowing 2 NPC's to talk
Posted: Sun Aug 15, 2021 9:17 am
by soniclinkerman
Hey!
Just a quick question on how to make NPC's talk to each other in this format
- issue5.png (639.77 KiB) Viewed 591 times
As of right now, when it plays, it only uses a single Text panel like this:
- issue6.png (645.03 KiB) Viewed 591 times
- issue7.png (615.91 KiB) Viewed 591 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.
Re: Allowing 2 NPC's to talk
Posted: Sun Aug 15, 2021 11:53 am
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.
Re: Allowing 2 NPC's to talk
Posted: Sun Aug 15, 2021 12:10 pm
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 (78.06 KiB) Viewed 580 times
Also my Standard Dialogue UI section.
- issue2.png (119.87 KiB) Viewed 580 times
For some reason, when the dialogue starts, the subtitle 1 panel turns itself off.
Re: Allowing 2 NPC's to talk
Posted: Sun Aug 15, 2021 2:06 pm
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).
Re: Allowing 2 NPC's to talk
Posted: Sun Aug 15, 2021 2:57 pm
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!
Re: Allowing 2 NPC's to talk
Posted: Sun Aug 15, 2021 3:04 pm
by Tony Li
Glad to help!