Skip to content

4.3 Listing Options

BDC_Patrick edited this page Nov 12, 2025 · 7 revisions

The Message Data of the Dialog Interface returns a Value called OptionMessagesCount, of type Integer.
If this value is greater than zero, the Message has available Options.

Alternatively, you can use the Subsystem's GetAvailableOptions and check for HasAnyOptions being true.

Gathering Options

To get all available Options of the current Message, you can use the Subsystem's GetAvailableOptions function.
This not only returns a bool (= HasAnyOptions) to check if there are any options attached to this message, but also returns an array of the option Data.
By iterating this Array with a Foreach Loop, you can create Option-Buttons or any other Way for the player to select a new path in your Dialog.

A simple Option Widget

[Image of Option Hierarchy]
Although the option Data has Avatar, Icon and such as Variable, the most simple approach is to have Button Widget showing Text only.

[Image of Option Graph]
The Graph simply could take the Option Data as Exposed variable, to set the text value of the Option.

[Image of Option Variables and Dispatchers]
It absolutely makes sense to hold the Option Data as exposed variable. The Struct is called Struct_DialogDatasetOption.
You also should have an exposed Integer of the "Option Index".
As last, add a Dispatcher "OnOptionSelected" to the Option Widget, with an Integer "Of Index" as Input variable.

[Image of Option clicking]
On Clicking the option Button, you want to call the Dispatcher, with the "Option Index" as Input.

[Image of Option Spawning]
Inside the Foreach of the available options, Spawn the option Widget with the Data attached, and add it to a container of your choice.
Also, after adding the Widget to the container, Bind Event to the "OnOptionSelected" Dispatcher, by using a CreateEvent Node.
[Image of Option Bind Event]
It makes sense, if you have spawned options, to set Focus on the first child of the option container (== the first option).

Documentation Index

I. What is the Dialog Backend?
II. Setting up
III. Binding UI
IV. The Subsystem
V. The Components
VI. Dispatchers
VII. Others

Demo available: Demo Page

Clone this wiki locally