Getting next dialogue entry ID ?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Abelius
Posts: 312
Joined: Fri Jul 21, 2017 12:45 pm

Getting next dialogue entry ID ?

Post by Abelius »

Hi there!

In my quest to implement "functions" inside conversations, I'm wondering if there is a way to get the Entry ID of the next dialogue entry.

My typical use case would be very simple, with just one node after the one getting the ID. But it would be nice (bonus points!) if it would be able to tell apart which one of the multiple next nodes will be the one it'll pick when Continue() is called.

Here is a rough outline of what I mean. Please ignore the adequacy of that flow, it's just an example and not my actual use case.

Both 'jumps' (go and return) are done from PlayMaker.

Image

Multiple entries:
Image
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: Getting next dialogue entry ID ?

Post by Tony Li »

If you don't mind a little C#, you can get the next dialogue entry from DialogueManager.currentConversationState. You can check if its hasNPCResponse property is true. If so, the next entry is in the firstNPCResponse property. Otherwise it's a player response. In this case, check if hasPCAutoResponse is true; if so, use pcAutoResponse. If not, use the pcResponses[] array.
Post Reply