How do I make a dialogue trees?

0 favourites
  • 8 posts
From the Asset Store
in 2D realistic Trees are included 26 realistic trees in different stems.
  • Here's the basic concept sketched out--

    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 .

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

    Not sure what I'm missing. Any thoughts?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Might be a good idea to show dialog2 as well. If that's the one not working.

  • nimos100 I added it in the orginal post.

  • 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?

  • nimos100 Here you go. Going to sleep on this before I try and fix it.

    https://drive.google.com/folderview?id= ... sp=sharing

  • 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

    .

    You may find some inspiration there on how to handle the recurrence and tree branching.

  • 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 <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    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.

  • Kyatric

    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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)