How do I make a dialogue trees?

Get help using Construct 2

Post » Thu Sep 24, 2015 6:34 pm

Here's the basic concept sketched out--
Image

So, I've gotten two branches of the tree to work by deactivating and activating groups. When Dialog0 is deactivated, then Dialog01 is active. This works :D.
Image

However, dialog2 won't load-- Also, the animation that play on Dialog0 doesn't play on Dialog01.

Image

Image
Not sure what I'm missing. Any thoughts?
Last edited by BurningWood on Sat Sep 26, 2015 4:44 am, edited 2 times in total.
B
15
S
5
G
2
Posts: 164
Reputation: 3,082

Post » Thu Sep 24, 2015 7:06 pm

Might be a good idea to show dialog2 as well. If that's the one not working. :)
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Fri Sep 25, 2015 6:33 am

@nimos100 I added it in the orginal post.
B
15
S
5
G
2
Posts: 164
Reputation: 3,082

Post » Fri Sep 25, 2015 7:55 am

BurningWood wrote:@nimos100 I added it in the orginal post.

Initially its seems fine, however there is a lot of waits in it which could be the problem. Also in dialog1 when you set it to dialog = 2 and enable dialog2 group, in that group you have a "If dialog = 2" then it should do a lot of things. But where do you change dialog to not be = 2? because otherwise it will keep being true and that seems like it could cause problems.

But can you upload a capx, might be easier to test?
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Fri Sep 25, 2015 9:41 am

@nimos100 Here you go. Going to sleep on this before I try and fix it.
https://drive.google.com/folderview?id= ... sp=sharing
B
15
S
5
G
2
Posts: 164
Reputation: 3,082

Post » Fri Sep 25, 2015 9:47 am

Indeed, the Waits are not the best idea there.
Also, why groups when you could use functions ?
And perhaps, better than wait actions, use timer behaviors to end up "cycles" in a more elegant fashion.

As far as I could imagine, you have two groups relying on clicking the same object (A) with different wait time. One group is likely taking "dominance" over the other, and it is probably the group 0 since the wait time is the shortest.

I also invite you to see the video I made on making a dialog interface using a XML file.
You may find some inspiration there on how to handle the recurrence and tree branching.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Fri Sep 25, 2015 11:07 am

BurningWood wrote:@nimos100 Here you go. Going to sleep on this before I try and fix it.
https://drive.google.com/folderview?id= ... sp=sharing

Can't seem to be able to download all files at once. And there is a lot of files so wont bother with that :D

However as Kyatric suggested, I would use functions a well. Because you can simply organize the function to work based on a parameter that you pass to it.

So if you make a code like this for instant:
[Dialog][Step]

This would make it possible for you to track which dialog you are working with fairly easy. So in this example, you could for instant pass D002S03:

And you would know that the first 3 numbers refer to the overall dialog also indicated by the D and the last two which specific step in that overall dialog it is, indicated by the letter S:
So passing D002S03 to your function would be Dialog 2 and the current step is 3

Anyway just an example, you of course would have to make a code system that would work with your game. But at least that way you don't have to copy/paste, activate/deactivate a lot of groups.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Sat Sep 26, 2015 4:25 am

@Kyatric
:D Thanks for the videos, I'm having to watch them multiple times as I want to understand C2 logic.

Re: "<dialog id='2' type='question'>
<question id='1' portrait='JimMerlin' mood='question' pos='left'>Have you noticed what is going on ?</question>
<answer id='1'>Yes</answer>
<nextdialog id='1'>3</nextdialog>
<answer id='2'>No</answer>
<nextdialog id='2'>4</nextdialog>"

For my trees, I need three choices, so would the xml code look like this?
<dialog id='2' type='question'>
<question id='1' portrait='JimMerlin' mood='question' pos='left'>Have you noticed what is going on ?</question>
<answer id='1'>A</answer>
<nextdialog id='1'>3</nextdialog>
<answer id='2'>B</answer>
<nextdialog id='2'>5</nextdialog>
<answer id='3'>C</answer>
<nextdialog id='3'>%</nextdialog>

And, will I have to edit or modify my wrong answer group?
Currently this group spawns enemies if the player answers a wrong answer.
Image
B
15
S
5
G
2
Posts: 164
Reputation: 3,082


Return to How do I....?

Who is online

Users browsing this forum: marc254 and 7 guests