User Tools

Site Tools


display_choices

This is an old revision of the document!


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).

Signature:

display_choices(message_text, choices, speaker)
ArgumentDescriptionTypeRequired
message_textMessage text to display in the dialogue box.StringYes
speakerCharacter that will speak the message.EntityNo

You can use 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 property).

Example:

display_choices("Pick an item.", array["Sword", "Dagger"], entity["Sarah"]);

Results: A dialogue box is displayed containing the text “Justin and Sarah's House”.

Use the Display Choices function to .


Editor Node:

display_choices.1625018627.txt.gz · Last modified: 2021/06/29 19:03 by justin