Dialogue System with Corgi Questions

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System with Corgi Questions

Post 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:

Image

Here's an example scene: DS_CorgiContinueButtonExample_2019-08-15.unitypackage
mindjar
Posts: 12
Joined: Tue Aug 06, 2019 11:22 am

Re: Dialogue System with Corgi Questions

Post 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.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System with Corgi Questions

Post 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.
mindjar
Posts: 12
Joined: Tue Aug 06, 2019 11:22 am

Re: Dialogue System with Corgi Questions

Post 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 :)
mindjar
Posts: 12
Joined: Tue Aug 06, 2019 11:22 am

Re: Dialogue System with Corgi Questions

Post 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 :)
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System with Corgi Questions

Post 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.
mindjar
Posts: 12
Joined: Tue Aug 06, 2019 11:22 am

Re: Dialogue System with Corgi Questions

Post by mindjar »

This is the same way how I did it, thanks for the example.
Post Reply