How to talk to yourself And speech bubble

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

How to talk to yourself And speech bubble

Post by SBSun »

How can I talk to myself like in the picture?

1. Do I have to use Bark to express it as a speech bubble?

If I had to use Bark, like Conversation, I wonder if the developer can select the next line according to the timing and condition of moving to the next line with a script.

2. And Bark has Fade In/Out function enabled by default, can this function be disabled?

3. Whether the developer can customize the components (image, location) of UI Prefabs
Attachments
캡처.PNG
캡처.PNG (464.72 KiB) Viewed 593 times
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to talk to yourself And speech bubble

Post by Tony Li »

Hi,

You can use a bark or a conversation. Barks are better for single lines. Conversations are better if the player must speak multiple lines, or if the player must exchange lines with another character.

In either case, add a Dialogue Actor component to the player. Assign a bark UI or bubble subtitle panel. For bubble subtitle panels, see: How To: Show Overhead Conversation Bubble Text

I recommend starting with one of the prefabs (e.g., Bubble Template Standard Bark UI or Bubble Template Standard UI Subtitle Panel). Duplicate it, customize it, and assign the duplicate to the Dialogue Actor component.

If you use a conversation, use these settings to show the player's subtitle text: How To: Bypass Response Menu When Player Has One Choice
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: How to talk to yourself And speech bubble

Post by SBSun »

Thank you for answer.

As you answered, I customized the Bubble Template Standard UI Subtitle Panel and added it as a child of NPC.

When you start talking to yourself, the speech bubble UI is normally displayed, but when you proceed with the next conversation, the Basic Standard Dialogue UI is output instead of the assigned Custom UI.

What's the reason?

I'm translating the text with Google Translate, so please understand if it's unnatural.
Attachments
5.PNG
5.PNG (48.01 KiB) Viewed 584 times
4.PNG
4.PNG (2.82 KiB) Viewed 584 times
3.PNG
3.PNG (61.61 KiB) Viewed 584 times
2.PNG
2.PNG (60.05 KiB) Viewed 584 times
1.PNG
1.PNG (7.79 KiB) Viewed 584 times
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to talk to yourself And speech bubble

Post by Tony Li »

Notice that the "Test2" node is blue:
assignedToPlayer.png
assignedToPlayer.png (10.66 KiB) Viewed 582 times

This means it is assigned to the Player. By default, all lines assigned to the Player will first appear in the response menu. In your case, you don't want this to happen. Use these Dialogue Manager settings:

Image

This will make it use the Player GameObject's subtitle panel. Make sure the Player GameObject has a subtitle panel:
playerBubblePanel.png
playerBubblePanel.png (72.51 KiB) Viewed 582 times
perezbalen
Posts: 40
Joined: Mon May 24, 2021 7:22 pm

Re: How to talk to yourself And speech bubble

Post by perezbalen »

Hi.
I'm using a Custom Subtitle Panel set to a prefab with a bubble UI. It works fine, except that I noticed the bubble floats in 3D space. This means, it intersects with 3D objects, and that if the actor is too far away, the text is too small to read.
Is there a way to have the dialogue bubbles always the same size?
Thanks.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to talk to yourself And speech bubble

Post by Tony Li »

Yes; use a screen space bubble, like the Screen Space Bubble example or the UI Smooth Follow example on the Dialogue System Extras page.

If you just want it to appear on top of everything else but at the same size/distance in 3D space, use a world space bubble. Put it on a unique layer, and set up a second camera (as a child of the main camera) whose Culling Mask is set to that layer.
perezbalen
Posts: 40
Joined: Mon May 24, 2021 7:22 pm

Re: How to talk to yourself And speech bubble

Post by perezbalen »

Thanks! After half a day I got it to work.
But now, I'm having this weird issue. The bubble sticks to the character's feet. But the UI Follow Object script has a Y offset, so I can move the bubble up to the head... The thing is that the offset is in pixels, but the head is not always at the same height. The further away, the closer to the ground. So, I get this weird optical illusion when the character walks away, like the balloon is floating away (it's not; it's always 440 px from his feet).
Is there a way to make the UI Follow Object script follow from the head? or the offset relative to the model's height, or something like that?
Thanks again.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to talk to yourself And speech bubble

Post by Tony Li »

Hi,

The UISmoothFollow offset is in world units. It may be that your UI's Main Panel has a pixel offset. (The Bubble Standard Dialogue UI Template has a 384 pixel offset I think.) Try setting this pixel offset to zero, and use only the UISmoothFollow's offset.
perezbalen
Posts: 40
Joined: Mon May 24, 2021 7:22 pm

Re: How to talk to yourself And speech bubble

Post by perezbalen »

Ok, I found a solution, in case someone else needs it.
I created an empty object as a child of the character model, named it "Mouth" and placed it on the character's mouth. Now, the UI Follow Object script has a Follow field. I place the Mouth there (instead of the character model itself), and let the Offset in 0,0.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to talk to yourself And speech bubble

Post by Tony Li »

Thanks for posting your solution!
Post Reply