Dialogue tree sequencing issues

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • So for one of my university assignments, I agreed with the rest of my group that we were going to develop a game. I, in particular, have been tasked with making a dialogue system for our sample level, specifically when the player interacts with the NPC. However, this is where the core issue of this post sets in.

    Please login to see this attachment.

    Above is the basic dialogue list for the NPC to say when the player interacts with them (i.e. by pressing Enter)

    Please login to see this attachment.
    Please login to see this attachment.

    The first three lines of dialogue will be cycled through whenever Enter is pressed.

    Please login to see this attachment.

    Here's where things get tricky. Selecting "Sure...I guess..." is supposed to set the convoNumber (the variable that controls the NPC's dialgoue) to 4, whereas "Sorry..." is supposed to set it to 5. However, paragraph number 5 ("Never mind...") is summoned no matter what option the player chooses.

    Please login to see this attachment.

    Here's the code for the option box. Internal flag 0 signifies whether it is functional and visible, whereas internal flag 1 denotes the option the player chooses (on = set convoNumber to 4; off = set convoNumber to 5).

    Please login to see this attachment.
    Please login to see this attachment.

    Here are the events triggered by the selection of either option. They are basically the same, so I don't see where I am going wrong.

    I have gotten some more-experienced programmers in on the case, but even they can't seem to figure out where I have gone wrong. Could any of you guys here on the forums point me in the right direction?

    Thanks

  • Now , I just lost a lot of time understanding the events , Too many flags and things non comented , after trying to figure out I decided to rewrite your events ....
    I used a "dialogue timer " variable to prevent accidentaly paragraf adding / changing ! And used variables to make the choise ! Give a look it would be easier to understand !

  • When writing code with events you sometimes ... for troubleshooting ... need to add troubleshooting fields to display what variables are set at and include pause commands to allow you to track what is happening. This is one of the best ways to understand what is happening as a program runs. As noted by esp add comments to your code both actions and conditions. Also name your items so it is easier to track. Example don't leave a button called "Button2" ... give it a meanful name like "Button - Quit Game"

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!