How do you show another dialog list when already in a dialog? Like when a character asks you a question, and you want the player to pick an option?
Edit: This topic is also covered in this video:
There's 3 ways of doing this, depending how much you want to add in the editor, and how much in code.
The First is to simply make a second DialogTree, set it up, and start the second dialog when you want. using D.SecondDialog.Start();, or Goto(D.SecondDialog);. Then to switch back, D.FirstDialog.Start();, or GotoPrevious(); This is best for big long dialogs with lots of options.
The Second is shown in the demo game. If you select the dialog "ChatWithBarney", there are three Options that have "show" left unticked. These aren't visible until the player clicks Option 2, and asks about the forest.
Inside that script you can see that all the regular Options are turned off, and the forest ones are turned On.
Dave: What's with this forest anyway? Barney: Whaddaya mean? OptionOff(1,2,3); OptionOff("bye"); OptionOn("tree","leaf","forestdone");
Then, the "Enough about forests" option turns the regular options back on again.
OptionOff("tree","leaf","forestdone"); OptionOn(1,2,3); OptionOn("bye");
This is where OptionOffForever comes in handy, since sometimes you don't want options to come back on when you return to the first list of questions
The Third is a quick way of doing simple choices purely in-code, called "Inline Dialog Options".
This way, you don't have to add the options to the editor at all, and is best when it's a one off quick-prompt.
Use the E.WaitForInlineDialog
function to show a user the options, then check the result with E.InlineDialogResult
(function documentation here).
Eg.
Barney: You fight like a dairy farmer! E.WaitForInlineDialog("How appropriate, you fight like a cow", "I am rubber, you are glue", "I'm shakin' I'm shakin'"); if ( E.InlineDialogResult == 0 ) { Dave: How appropriate, you fight like a cow LoseSwordFight(); } else if ( E.InlineDialogResult == 2 ) { Dave: I'm shakin' I'm shakin' WinSwordFight(); }