IsConversationActive goes false faster!

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
r35
Posts: 5
Joined: Sat Apr 10, 2021 11:46 am

IsConversationActive goes false faster!

Post by r35 »

Hey tony,

I found that IsConversationActive is happening faster than the actual conversation ends(in the eye perspective),

due to its HIDE animation.

In our case, if the user spamming to talk to the NPC before the panel HIDE animation ends,

another new dialogue happens but that the new dialogue panel becomes hide and makes the whole game stuck.

is there any easy property to check that the Dialogue panel is still activating and trying to hiding right now?
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive goes false faster!

Post by Tony Li »

Hi,

Try ticking the subtitle/menu panels' and Standard Dialogue UI's Wait For Close checkboxes.
r35
Posts: 5
Joined: Sat Apr 10, 2021 11:46 am

Re: IsConversationActive goes false faster!

Post by r35 »

Tony Li wrote: Sat Apr 10, 2021 1:11 pm Hi,

Try ticking the subtitle/menu panels' and Standard Dialogue UI's Wait For Close checkboxes.
Thank you for your quick response,

but It seems that the wait for close options doesn't help at the moment.

would you please check this test project, please?
It's using almost the same settings as the issued one.
made in 2019.4.19f1

[Removed project: please don't post assets publicly.]
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive goes false faster!

Post by Tony Li »

Hi,

I'll download the project and take a look.
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive goes false faster!

Post by Tony Li »

(Sorry, somehow I accidentally locked this topic. I apologize if you tried to to reply. It's unlocked now.)

Change this line:

Code: Select all

            if (Input.GetMouseButtonUp(0))
to this:

Code: Select all

            if (Input.GetMouseButtonUp(0) && 
                (DialogueManager.dialogueUI as StandardDialogueUI).conversationUIElements.mainPanel.panelState == PixelCrushers.UIPanel.PanelState.Closed)
This makes it also check that the dialogue UI is closed.

In version 2.2.16, you'll be able to just check !(DialogueManager.dialogueUI as StandardDialogueUI).isOpen, which is shorter code. It will also make the panel reappear if you start a conversation while it's closing from the previous conversation.
r35
Posts: 5
Joined: Sat Apr 10, 2021 11:46 am

Re: IsConversationActive goes false faster!

Post by r35 »

Tony Li wrote: Sat Apr 10, 2021 8:05 pm (Sorry, somehow I accidentally locked this topic. I apologize if you tried to to reply. It's unlocked now.)

Change this line:

Code: Select all

            if (Input.GetMouseButtonUp(0))
to this:

Code: Select all

            if (Input.GetMouseButtonUp(0) && 
                (DialogueManager.dialogueUI as StandardDialogueUI).conversationUIElements.mainPanel.panelState == PixelCrushers.UIPanel.PanelState.Closed)
This makes it also check that the dialogue UI is closed.

In version 2.2.16, you'll be able to just check !(DialogueManager.dialogueUI as StandardDialogueUI).isOpen, which is shorter code. It will also make the panel reappear if you start a conversation while it's closing from the previous conversation.
Sorry for the dumb uploading, and thank you for your effort!

I really like using Dialogue System for Unity,

it's great to take a little part in and see it's getting better.

Thank you, Tony
Have a great day!
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: IsConversationActive goes false faster!

Post by Tony Li »

Glad to help! Have a great day!
Post Reply