Determine if conversation active

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Haddicus
Posts: 6
Joined: Sun Feb 19, 2017 1:16 pm

Determine if conversation active

Post by Haddicus »

I'm trying to figure out the best way to determine whether a dialog is currently active in C# code, but haven't been able to find something in the forum or in the docs. Generally, I just want to call some type of isActive for the dialog manager/current dialog. Basically, there are certain objects I don't want the player to be able to click on, during conversations, so I need to do a check in those objects, whether or not the dialog is active.

I assume this is a pretty simple issue, but I inherited a game from another person, whom was using this system, so please forgive my ignorance.

Thanks in advance,

-Haddicus
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Determine if conversation active

Post by Tony Li »

Hi,

Check DialogueManager.IsConversationActive:

Code: Select all

if (DialogueManager.IsConversationActive) Debug.Log("A conversation is active."); 
Haddicus
Posts: 6
Joined: Sun Feb 19, 2017 1:16 pm

Re: Determine if conversation active

Post by Haddicus »

Perfect, thank you!
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Determine if conversation active

Post by Tony Li »

Happy to help! The Dialogue System is a big system with a lot of documentation. I know it can take a while to get a bearing, especially if you inherited an existing project from someone else. If you ever have any questions, please don't hesitate to post here or email tony (at) pixelcrushers.com.
Post Reply