[Solved] Get current actor/conversant id

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

[Solved] Get current actor/conversant id

Post by Japtor »

Hi,

Is there a way to get by C# the current actor/conversant id (or his name if you can't access it) from an active conversation ->dialogue node?

Thanks! :)
Last edited by Japtor on Fri Oct 26, 2018 6:27 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get current actor/conversant id

Post by Tony Li »

Hi,

Yes. It's in DialogueManager.currentConversationState. It has a subtitle property with CharacterInfo on the current actor (speakerInfo) and current conversation (listenerInfo), including their id's. Example:

Code: Select all

int actorID = DialogueManager.currentConversationState.subtitle.speakerInfo.id;
Japtor
Posts: 120
Joined: Thu Jun 28, 2018 1:41 pm

Re: Get current actor/conversant id

Post by Japtor »

Hi,

Thank you very much! This is what I was looking for :)
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Get current actor/conversant id

Post by Tony Li »

Happy to help!
Post Reply