Id like for my character to have a dialogue tree and if they select yes Ill stay, it sends them back to the beginning because their character is saying essentially they dont want to continue but if they say no, I want to start a new life it goes to the next level continuing their journey. Is it possible to do this, if so, how? Thanks in advance
You can do this using some simple alerts. Can you send me the game link? I can get a screenshot from there.
no, do not use alerts
Flowlab Game Creator - Auto Type use this
Well, he only needs two dialogue thingies. It’s simpler to use alerts, but this would be more professional.
Not really 2 options. A dialogue tree just refers to having options, there could be several branches to it.
While not using Alerts looks more professional, there other reasons for why you shouldn’t use alerts.
Also it seems like this original request still hasn’t been solved, Galactian only provided a way to type out the dialogue (which may not even be wanted, sometime instant dialogue can be wanted).
As a general thing you should be using a Text List to hold the dialogue options. It’s a bit confusing to explain though, and I don’t have a ton of time.
Someone asked a similar question before and I tried to help them, let me see if I can find the post
I’m not sure how the explain he made is, probably not perfect, but most likely can be the bones of a system for you
——
This is an old thing I said to him, not sure how accurate I was in what I was saying, probably some flaw and whatnot I’d find now that it’s 9 months later.
——
Step 1: What you want
So typically when I’m stuck on a problem I like to break it up into very small parts, and normally just from this the answer can reveal itself.
- Click option A or B
- If A is clicked, show Dialogue A
- If B is clicked, show Dialogue B
(So it’s: Click Option → Select Dialogue Option → Display Dialogue)
Step 2: What you now know
So I’m sure you already know that, but if we break it apart more we see there are 2 dialogues (A & B).
This means that 2 Text Lists will be used, one with dialogue A and the other with dialogue B.
Now you need to activate those dialogues with a clicking option.
(I’ll explain how to format the text inside the lists later).
Step 3: Complete the beginning part
So the first part is being able to select an option.
I’m assuming you already know how to do this, but in case not I’ll explain a little.
- If object A is clicked, send a message equal to 1
- If object B is clicked, send a message equal to 2
(These messages will be sent to the object with the dialogue)
What will be done with these messages?
Using a Router you can select specific outputs via the “Select” input.
(Make sure it is set to “Select specific route”)
Output 1 will give Dialogue A
Output 2 will give Dialogue B
Step 4: Complete middle part(s)
Most everything you will make will have an activation and a result. But the key part is the steps in between to reach that result.
In this case, you have already selected a dialogue option, now you need to have to give dialogue to your display function (I’ll explain the display function later)
This step requires knowing how lists work. Let’s say you want to show the messages
(1) “Hello, nice to meet you.”
(2) “What’s your name?”
(3) “That’s an awesome name!”
You would need to get these items from inside the List (“items” just refers to the text that is held within the Text List)
I will be using this as the example list
[(1)“Hello, nice to meet you.”, (2)“What’s your name?”, (3)“That’s an awesome name!”]
( I used (1),(2),(3) to show that these are separate items and their placement within the list. This number is referred to as the Index)
Technically there are 4 options that can give you these items, but in slightly different ways.
The “All” output. This will output the entire list, but you are looking for individual items so this isn’t what you’re looking for.
The “One” output.
If you input a number into the “One” input, it will give you an item at that index.
This means if you input 1, you would receive the output “Hello, nice to meet you.”
If you input 5 (a number greater than the total indexes) you would get the last item in the list
“That’s an awesome name!”This will give you individual items within the list like you want. So if you wanted to get the values this way, you would do this
Number=1(Out) → (+)Number=0 → (One)Text List(One) → Output is the item at that specific spot. Each time you want to show the next message, you would increase the value by 1 to get the next item.
The “Pop” output.
This will REMOVE the LAST item in the list. This is NOT dependent on what the input value is.
So using the example list, the first time you input you would get
“That’s an awesome name!”
Then “What’s your name?”
And after that “Hello, nice to meet you.”
(If you inputted any more after this the list would be empty, so you would receive no output)This is not exactly what you’re looking for because it’s backward, but it’s almost there.
To fix this you could do 2 methods.
- Enter all of your dialogue in reverse order.
- To make it a little easier you can write all of your dialogue like normal, and then use the List Order behavior to reverse it.
The “Join” output.
This is not what you want.
In summary, it combines everything in the list with what you inputted.
So if you input "CAKE " the output result would be;
“Nice to meet you.CAKE What’s your name?CAKE That’s an awesome name!”
WOW! You wrote that Just now?!
I wrote that about 9 months ago for someone else, that’s about if of 3 other messages like it I think lol
This is all helpful for my dialogue but I dont think I saw in there how to make one of the options for an answer in the dialogue trigger an action which is what I am looking for like if a character says Please dont go and they select okay I wont , that answer triggers the character to return to the first level or like No, I want a new life as an answer instead triggers the character to go to the next level.
Sounds like you just need to add 2 buttons, one that brings you back the the previous level, and another that continues forward.
You can turn these buttons on by whatever triggers the original message
If you use this method you can just use a filter that reacts to the node number of the dialogue tree (called QA number in this example)