Page 1 of 1
How to talk to yourself And speech bubble
Posted: Wed Sep 14, 2022 11:01 am
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
Re: How to talk to yourself And speech bubble
Posted: Wed Sep 14, 2022 11:18 am
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
Re: How to talk to yourself And speech bubble
Posted: Thu Sep 15, 2022 8:25 am
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.
Re: How to talk to yourself And speech bubble
Posted: Thu Sep 15, 2022 9:03 am
by Tony Li
Notice that the "Test2" node is blue:
- assignedToPlayer.png (10.66 KiB) Viewed 611 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:
This will make it use the Player GameObject's subtitle panel. Make sure the Player GameObject has a subtitle panel:
- playerBubblePanel.png (72.51 KiB) Viewed 611 times
Re: How to talk to yourself And speech bubble
Posted: Wed Dec 07, 2022 3:48 pm
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.
Re: How to talk to yourself And speech bubble
Posted: Wed Dec 07, 2022 3:59 pm
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.
Re: How to talk to yourself And speech bubble
Posted: Thu Dec 08, 2022 12:52 am
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.
Re: How to talk to yourself And speech bubble
Posted: Thu Dec 08, 2022 8:35 am
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.
Re: How to talk to yourself And speech bubble
Posted: Thu Dec 08, 2022 8:44 am
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.
Re: How to talk to yourself And speech bubble
Posted: Thu Dec 08, 2022 8:53 am
by Tony Li
Thanks for posting your solution!