← Previous | Next →
ask
Description
Presents a question to the player with a set of possible responses. The result is the index of the chosen response.
Name | Type | Possibilities |
ask | interaction | 2 |
Parameters
# | Name | Type | Mandatory | Description | Multiple |
1 | title | string | Yes | The question or title to be presented to the player. | No |
2 | answer | string | Yes | The possible responses to the question. The number of responses is optional. | Yes |
Outputs
# | Description |
1 | The index of the selected response. |
2 | If the player cancels, the result is the index after the last option. |
Example
NPC
name NPC
model a_m_m_eastsa_01
position -1020.72 4839.78 258.30 0.0
interaction
ask "What will you do?" Fight Run
tell "You chose to fight."
tell "You chose to run."
behaviour
nothing