Check if Specific Conversation or Actor is Active in Script?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
datchcole
Posts: 10
Joined: Tue Jun 15, 2021 2:05 am

Check if Specific Conversation or Actor is Active in Script?

Post by datchcole »

I know I can use dialogueManager.IsConversationActive to check if any conversation is active, but is there a way to check if either a specific conversation or if not, if a specific actor is active in a script? Thank you for any help.
User avatar
Tony Li
Posts: 21985
Joined: Thu Jul 18, 2013 1:27 pm

Re: Check if Specific Conversation or Actor is Active in Script?

Post by Tony Li »

Hi,

If you only allow one conversation at a time, which is the default setting on the Dialogue Manager, you can check DialogueManager.lastConversationStarted for the conversation title or DialogueManager.lastConversationID for the conversation ID number. The actor is in DialogueManager.currentActor.

If you allow simultaneous conversations, you can loop through DialogueManager.instance.activeConversations.
datchcole
Posts: 10
Joined: Tue Jun 15, 2021 2:05 am

Re: Check if Specific Conversation or Actor is Active in Script?

Post by datchcole »

Awesome thank you.
User avatar
Tony Li
Posts: 21985
Joined: Thu Jul 18, 2013 1:27 pm

Re: Check if Specific Conversation or Actor is Active in Script?

Post by Tony Li »

Glad to help!
Post Reply