Page 2 of 2
Re: Dialogue System with Corgi Questions
Posted: Thu Aug 15, 2019 9:19 am
by Tony Li
Hi,
Try assigning the continue button to the player subtitle panel's First Selected field, and set Focus Check Frequency to a non-zero value:
Here's an example scene:
DS_CorgiContinueButtonExample_2019-08-15.unitypackage
Re: Dialogue System with Corgi Questions
Posted: Thu Aug 15, 2019 5:34 pm
by mindjar
Thanks for that - in this demo it all works flawlessly. But I've tried with my setup and there's one catch. I have a screen space canvas and two panels: Subtitle and response Menu. Both are moved by UI Smooth Follow script from Your previous demo. I've tried fix with setting the First Selected and it works with subtitle panels. But when selecting response from menu the continue button on next dialogue is not focused - basically when the panels switch from responses to regular dialogue subtitle the continue button loses focus.
I think the problem is that I have two separate panels - one for subtitle and the other for response menu. Is there a way to combine it into one single panel and switch between dialogue subtitles and response menu? I've tried but I couldn't get that functionality.
Re: Dialogue System with Corgi Questions
Posted: Thu Aug 15, 2019 10:13 pm
by Tony Li
Hi,
I think you can put both components on the same panel, but it's not necessary. Here's an example so we have a common point of reference:
DS_CorgiScreenSpaceFollowExample_2019-08-15.unitypackage
I added screen space canvases to the NPC and the player prefab. (And set their order to 1 so Corgi's canvases don't block mouse input to them.)
On the subtitle panels, I set:
- First Selected: continue button
- Focus Check Frequency: 0.2
- Refresh Selectables Frequency: 0.5
- Select Previous On Disable: unticked
On the response menu panel, I did the same except for assigning First Selected.
If your scene works differently, you might check for differences on the Dialogue Manager (both the Display Settings section and the Input Device Manager), the characters' Dialogue Actor components, and the panels.
Re: Dialogue System with Corgi Questions
Posted: Fri Aug 16, 2019 5:33 am
by mindjar
I may have pinpoint the problem. I've tried the package You've prepared in two different projects. In my it doesn't work - buttons keeps going out of focus. The only thing changed between these project is the dialogue database. In my I wanted to have multi NPC conversations, so I've named the NPCs to test it.
Here's
my dialogue database.
I don't know if it's the proper way to do it, but it was working to some point
Re: Dialogue System with Corgi Questions
Posted: Fri Aug 16, 2019 9:28 am
by mindjar
Ok, I think I've figured it out, but I don't know what was the problem. I'll style my dialogue box and see if everything will work the same way
Re: Dialogue System with Corgi Questions
Posted: Fri Aug 16, 2019 9:51 am
by Tony Li
To test multiple NPCs, I reassigned the first line to Dude 1. So Dude 1 speaks the first NPC line, and CREW 2 speaks the rest. Here's the test scene in case it's helpful:
DS_Corgi_TestMindjar_2019-08-16.unitypackage
One note: The smooth follow script turns on following when it receives an OnConversationStart message. The OnConversationStart message is only sent to the primary actor & conversant. Since CREW 2 is an additional participant, it doesn't receive OnConversationStart. So I ticked CREW 2's Follow checkbox to make its panel always follow CREW 2.
Re: Dialogue System with Corgi Questions
Posted: Thu Aug 29, 2019 9:56 am
by mindjar
This is the same way how I did it, thanks for the example.