======Display Choices====== ---- 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, when paired together with the [[Display Message]] function, can be used to create simple, on the fly conversations without the need for a standalone [[dialogue]] file. ====Signature:==== display_choices(message_text, choices, speaker) ^Argument^Description^Type^Required^ |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|Character]] who will speak the message.|[[Entity]]|No| You can use [[placeholder_expression|placeholder expressions]] within the message text, or even variables and properties on their own, if you'd like to display dynamic information (for example, the current value of a [[global_properties|global property]]). ====Example:==== display_choices("Choose a reward!", array["Food", "Potions"], entity["Sarah"]); //Results:// A [[dialogue]] box spoken by Sarah is displayed, containing the text "Choose a reward!" along with two options for the player to choose between. Use the **Display Choices** function to provide a list of rewards for the player to choose from upon completing a quest or to provide a prompt that determines the next event in a cutscene when the player is faced with a decision. ---- ====Editor Node:==== {{:wiki:display_choices_node.png?nolink|}} ~~NOTOC~~