How can I show question along with responses ?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hoangvm2307
Posts: 10
Joined: Thu Feb 29, 2024 10:11 am

How can I show question along with responses ?

Post by hoangvm2307 »

Like this:
Do you want to have an apple ?
1. Yes
2. No

Normally, it only appears 2 responses "Yes" and "No". How can I add the line "Do you want to have an apple ?"
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I show question along with responses ?

Post by Tony Li »

Hello,

I assume your conversation looks something like this:

wantApple.png
wantApple.png (9.63 KiB) Viewed 240 times

To keep "Do you want an apple?" visible while showing the response menu, set the subtitle panel's Visibility to Always From Start, Always Once Shown, or Until Superceded:

visibilityAlwaysFromStart.png
visibilityAlwaysFromStart.png (44.49 KiB) Viewed 240 times

Then the NPC subtitle panel will stay visible while showing the response menu:

wantAppleMenu.png
wantAppleMenu.png (8.74 KiB) Viewed 240 times
hoangvm2307
Posts: 10
Joined: Thu Feb 29, 2024 10:11 am

Re: How can I show question along with responses ?

Post by hoangvm2307 »

Thank you Tony :D :D
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I show question along with responses ?

Post by Tony Li »

Glad to help!
hoangvm2307
Posts: 10
Joined: Thu Feb 29, 2024 10:11 am

Re: How can I show question along with responses ?

Post by hoangvm2307 »

Yesterday I was late and couldn't check.
What I mean is the confirmation line in the response panel.
For example:
  • NPC: "The apple just for 20 coins."
  • Response:
    "Do you want apple? (Confirmation line)
    1.Yes
    2.No"
Normally, when the response panel is opened, it obscured the subitile panel. What I want to achieved is the confirmation line appear first, then response. Do I have to use any "Vertical Layout Group"? I'm using JRPG Dialogue UI.

Image

Something like this.
Sorry for any inconvenience
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I show question along with responses ?

Post by Tony Li »

Hi,

Yes, use a vertical layout group. Here's an example:

DS_JRPG_UI_VerticalLayout_2024-03-05.unitypackage

It's a variant of the JRPG template prefab. I added Vertical Layout Groups.
hoangvm2307
Posts: 10
Joined: Thu Feb 29, 2024 10:11 am

Re: How can I show question along with responses ?

Post by hoangvm2307 »

Thank you so much, amazing support :D :D
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I show question along with responses ?

Post by Tony Li »

Glad to help!
Post Reply