Page 2 of 2

Re: Possible subtitle clearing bug (?)

Posted: Sat May 26, 2018 6:53 pm
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.

Re: Possible subtitle clearing bug (?)

Posted: Sat May 26, 2018 7:22 pm
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.

Re: Possible subtitle clearing bug (?)

Posted: Sun May 27, 2018 5:09 am
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!

Re: Possible subtitle clearing bug (?)

Posted: Sun May 27, 2018 9:12 am
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.

Re: Possible subtitle clearing bug (?)

Posted: Sun May 27, 2018 12:58 pm
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.

Re: Possible subtitle clearing bug (?)

Posted: Sun May 27, 2018 2:59 pm
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. :-)

Re: Possible subtitle clearing bug (?)

Posted: Mon May 28, 2018 3:30 am
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!

Re: Possible subtitle clearing bug (?)

Posted: Mon May 28, 2018 9:26 am
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

Re: Possible subtitle clearing bug (?)

Posted: Mon May 28, 2018 10:04 am
by Alatriste
That's pretty cool! I didn't know it worked that way. Thanks!! ;)