Hi all
I'm working on a dialogue puzzle, and I want the dialogue to end abruptly if the player chooses certain responses. This is no problem in the first branch, but on the inner branches it always returns to the previous dialogue (I'm using a modified version of the oldguy arrays from the WME demo.)
I found an
old topic discussing this, and Metamorphium gave this response:
If you want then to in some inner branch cancel the whole dialogue you can use the following trick:
while (loop)
{
...
...
Selected = Game.GetResponse();
switch (Selected)
{
...
case 1:
loop = SomeNextBranch();
break;
case 3:
loop = false;
break;
}
}
And in the critical response of the inner branch you set return false; otherwise you return true. So when the SomeNextBranch ends with your terminal response, the loop will end too.
This seems to be what I'm looking for, but I'm a technical dunce, and don't really understand how to implement it. Not very clear on using the switch/case commands. What do we set "return false"? The loop? A code snippet showing the inner branch would be really helpful.
Anyone able to explain this to a child? Is there any other way to just abort the dialogue using a simple command?
Thanks