Page 1 of 1

[Solved] Get current actor/conversant id

Posted: Thu Oct 25, 2018 11:34 am
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! :)

Re: Get current actor/conversant id

Posted: Thu Oct 25, 2018 11:58 am
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;

Re: Get current actor/conversant id

Posted: Thu Oct 25, 2018 12:11 pm
by Japtor
Hi,

Thank you very much! This is what I was looking for :)

Re: Get current actor/conversant id

Posted: Thu Oct 25, 2018 2:17 pm
by Tony Li
Happy to help!