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