Check whether a conversation is waiting for a response?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
LostTrainDude
Posts: 74
Joined: Wed Mar 21, 2018 2:14 pm

Check whether a conversation is waiting for a response?

Post by LostTrainDude »

[Unity 2019.4.39f1 - AdventureCreator v1.75.3 - DS v2.2.27]

Hi Tony!

Is there a "native" way to check whether responses are currently visible on screen? I'm trying to tie that into a state machine that I'm using for a UI manager. Currently I'm using the DialogueSystem Events to send the game into a DIALOGUE_OPTIONS state.

I basically want to hide the response menu and disable all of its inputs while pausing and switching between the different menus (each of them has a different state), but also be able to resume it once I turn them off, sending the game back to its former "DIALOGUE_OPTIONS" state.

Thanks a lot in advance!
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Check whether a conversation is waiting for a response?

Post by Tony Li »

Hi,

You could check if the response menu panel is open. Example:

Code: Select all

bool isWaitingForResponse = DialogueManager.standardDialogueUI.conversationUIElements.defaultMenuPanel.isOpen;
If you want callbacks, you can hook into the menu panel's OnOpen() and OnClosed() UnityEvents. (The OnClose() event runs as soon as the menu panel starts to disappear. OnClosed() runs when the panel is fully hidden, in case your panel uses a hide animation.)
Post Reply