Possible subtitle clearing bug (?)

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Possible subtitle clearing bug (?)

Post by Alatriste »

Hi,

I have found a similar issue and it might be related.

In my case, the subtitles from the NPC remains in the UI when the player sentences options appear (if there is only one sentence there is no problem). I believe is because the "UI Visibility" option is set up as "Always Once Shown". I'd expect this would affects the portrait of the NPC, but it seems to affect also the text, although the option in the Dialogue System manager -> "Show NPC Subtitles with Responses" is disabled.
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

Hi,

A Unity UI Dialogue UI has three panels:

1. NPC Subtitle Panel.
2. PC Subtitle Panel.
3. Response Menu Panel. The Response Menu Panel has a Subtitle Reminder subpanel.

"Show NPC Subtitles With Responses" makes the Response Menu's Subtitle Reminder subpanel appear.

If the NPC Subtitle Panel's "UI Visibility" is set to "Always Once Shown", then the entire panel (portrait and subtitle text) will stay visible. If you want to hide it during the response menu, you can design your response menu panel to cover the subtitle panel.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Possible subtitle clearing bug (?)

Post by Alatriste »

Hi Tony,

I understood that, but is there a way to clear the NPC line after it has been displayed? I made a test and no matter how I do it, the NPC Line Subtitle GameObject always remains enabled. (with the UI Visibility-> Always Once Shown)

What I try to achieve is that the portrait of the NPC is always on when the conversation starts, but the lines of dialogue are cleared once they are delivered.

Thanks!
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

Hi,

If you have one subtitle text element that all characters share, you can add a Dialogue System Events component to the Dialogue Manager or dialogue UI. Configure the Conversation Events > On Conversation Line End to clear the text element.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Possible subtitle clearing bug (?)

Post by Alatriste »

After too much frustration without making it work, I finally found a way to work around the problem. In the "Response Menu Sequence" of the node that was shown during the answers, I wrote a new sequence: SetActive(Subtitle Line, false)

That made the trick. I still have the feeling that that gameObject should be disabled if, in the Dialogue Manager, the Show NPC Subtitles With Responses is NOT ticked. I have the feeling it was working fine in other of my tests, so it might be something with the Visual Novel package? I couldn't say. But it's working so I'm happy. :)

I couldn't use your previous solution, Tony, because I don't know to code in C#, but I guess that could have work too.
Last edited by Alatriste on Mon May 28, 2018 3:31 am, edited 1 time in total.
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

Hi,

Since it's working, you can just consider this extra information: Dialogue System Events is a component that you can add to the Dialogue Manager. It doesn't require any scripting. You can configure Conversation Events > On Conversation Line End to clear the text element. But, now that you have a working solution, you don't need to do that. If it's not broken, don't fix it. :-)
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Possible subtitle clearing bug (?)

Post by Alatriste »

Dialogue System Events is a component that you can add to the Dialogue Manager. It doesn't require any scripting. You can configure Conversation Events > On Conversation Line End to clear the text element.
How does it work? Because when I tried it seems that the component was asking for a script when I enabled the "On Conversation Line End". Do you have any tutorial on the way to work with these events? Seems to be very handy and I'd like to know how they work.

Thanks as always!
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Possible subtitle clearing bug (?)

Post by Tony Li »

It's like the OnClick() event on a Unity UI Button. You can assign a GameObject and then change the properties of its components using a dropdown menu. It doesn't require any scripting. For example, below I assigned the NPC Subtitle Line GameObject and set its UI Text component's text property to a blank string:

Image
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Possible subtitle clearing bug (?)

Post by Alatriste »

That's pretty cool! I didn't know it worked that way. Thanks!! ;)
Post Reply