Game logic - Dialogue – Ylands
Jump to navigation
Jump to search
Description
Shows player a window of predefined options, which can be selected from. Each option then can execute its own sequence of actions.
- Dialogue between player and world entity (i.e NPC)
- Initiated via Show dialog instruction
- Player selects from pre-defined answers
- Each answer can call different script instructions
- Selected answer is obtained via Answer id, when On answered event is called (see example)
Properties
- Question - question shown
- Answer options - list of possible answers, number of option → Id
- Show leave button - whenever to show "leave" button or not
Events
- On open - called when dialog start
- On answered - called when dialog option is selected
- On closed - called when leave button clicked
Instructions
- Show dialog - opens dialogue window
- Get/Set question - get or set dialogue question
- Get/Set answer text - get or set specific dialogue option by Id
- Get/Set answer enabled - get, enable or disable specific dialogue option by Id
Literals
- Dialogue - target dialogue game logic
- Questioner - entity asking question
- Player - target player answering dialog
- Answer id - Id of selected answer (as in properties)