Dialogue trees?

Is there a way to make a dialogue popup where the user has choices, and then it shows different dialogue depending on the choice?

I’ve searched through this forum, found posts on dialogue but they just seem to be about long narratives by an NPC, or were posted a long time ago so might not be relevant since the introduction of text lists and such.

What I’m trying to do is more like the alert box with more buttons.

This is very possible, and you touched on how to do this. Text Lists.

This is what you’d want to do.

Click button 1 → Router (1) → Text List
Click button 2 → Router (2) → Text List
etc

3 Likes

So I’d have a label element, add buttons to it (not sure how this is done but this I’m sure is in the forums somewhere), then what you describe above, and then Text list A would have the answer to button choice A, and then how would I continue the tree? Sorry, haven’t done much with text in Flowlab yet, have just had a label appear as the result of a collision.

The Text List behavior has a Pop input, which will output the last item in the list. You can use that as a way to continue the dialogue

2 Likes

Thanks! Do you know of any games that use this technique already? Would be helpful to take a look.

Something like this?

1 Like

Yes, something like that would work, just make sure the text is in the proper order.

So if you wanted to say
“Hello”
“World”

then the list would be [World, Hello]
This is because the last item in a list is removed with the pop input

2 Likes

So with @CodeAlpaca s generous help (seriously!) I now have one way to make a dialogue tree where each choice has two options:

And one where each choice can have more than two, although getting the text list and number position list just right can be a bit confusing:

They’re both based on this kind of numbering system:

Now these questions remain:

  • How could one more elegantly address how to hide or show certain answer options, or even custom answer options beyond yes or no?
  • How could one make creating the content for a text list, and figuring out what numbers to put in the numbers list, more intuitive?
  • Are there other ways of doing this?
1 Like

Ideally I’d like to figure out a way to make a bundle with inputs that take care of the list organization and calculation for you.

1 Like