This is an old revision of the document!
Displays a set of choices to the player using a dialogue box. The list of choices must be provided as an array of string values. Once the player has selected an option, the choice will be stored into the result variable as a number (with 0 being the first option, 1 being the second, and so forth). This function, along with the related Display Message function, can be used to create simple, on the fly conversations without the need for a standalone dialogue file.
display_choices(message_text, choices, speaker)
|message_text||Message text to display in the dialogue box.||String||Yes|
|choices||List of choices the player will be presented with.||Array||Yes|
|speaker||Character who will speak the message.||Entity||No|
display_choices("Choose a reward!", array["Gold Coins", "Potions"], entity["Sarah"]);
Results: A dialogue box is displayed containing the text “Justin and Sarah's House”.
Use the Display Choices function to .