Any way to know if conversation on the last node?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
TonyCooper
Posts: 8
Joined: Mon Aug 15, 2022 3:56 pm

Any way to know if conversation on the last node?

Post by TonyCooper »

Hello,
Using DS and PlayMaker I'm setting up a UI with two buttons that I want to be able to step forward and backward through a conversation when I click on them.
I know the first conversation node Entry ID is always 1, and I can get that information with Get Current Conversation Info, so I know to disable the 'back' button in that case.
But my question is, is there any way I can get the last/max node entry ID for a conversation so that I know to disable the 'forward' button when the content of the last node is displayed?

I don't mind having to do some light scripting/code editing fyi, so it doesn't have to be a PM solution :)
Thanks!
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any way to know if conversation on the last node?

Post by Tony Li »

Hi,

If the C# property DialogueManager.currentConversationState.hasAnyResponses is false, then you're on the last node.
TonyCooper
Posts: 8
Joined: Mon Aug 15, 2022 3:56 pm

Re: Any way to know if conversation on the last node?

Post by TonyCooper »

Ah, that's great - I'll try and use that.
Thanks!
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Any way to know if conversation on the last node?

Post by Tony Li »

Glad to help!
Post Reply