Game logic - Dialogue – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ")
m (Text replacement - " (\=+)([a-zA-Z0-9][^ ]+[a-zA-Z0-9])(\=+) " to " $1 $2 $3 ")
Line 14: Line 14:
</gallery>
</gallery>


=Properties=
= Properties =
=== Question ===
=== Question ===
*Question displayed in the header of the dialogue
*Question displayed in the header of the dialogue
Line 23: Line 23:
*Whenever to show "leave" button in the Dialogue window.
*Whenever to show "leave" button in the Dialogue window.


=Dialogue events=
= Dialogue events =
*[[Ylands Tile - Dialogue On Answer|On Answer]]
*[[Ylands Tile - Dialogue On Answer|On Answer]]
*[[Ylands Tile - Modal Dialogue On Open-Close|On Open / Close]]
*[[Ylands Tile - Modal Dialogue On Open-Close|On Open / Close]]


=Related instructions=
= Related instructions =
*[[Ylands Tile - Show dialogue|Show dialogue]]
*[[Ylands Tile - Show dialogue|Show dialogue]]
*[[Ylands Tile - Dialogue question|Get / Set dialogue question]]
*[[Ylands Tile - Dialogue question|Get / Set dialogue question]]

Revision as of 15:41, 17 November 2021

Description

When initiated using Show Dialogue instruction, it will display a window of predefined options as defined in properties. After selecting a option On Answer event will be called inside the Dialogue logic. It's possible to show/hide answer options using Answer Enabled instruction, or modify their text.

  • 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 in On Answer event (see example)

Properties

Question

  • Question displayed in the header of the dialogue

Options

  • List of possible answers
  • Number in the header of the option → answer Id

Show leave button

  • Whenever to show "leave" button in the Dialogue window.

Dialogue events

Related instructions