Skip to main content

Response Service

Description

Manages dialogue option presentation and player selection during conversations. Filters available connections, populates option labels, handles keyboard, mouse and gamepad input, and triggers navigation when the player selects an option.

Only connections marked to display within options, and whose availability check passes for the speaking agent, are offered. See Responses and Options.

Interface

Type
IChatResponseService

Inherits

Type
IDisposable

Fields

NameTypeDescription
currentSelectedOptionintThe index of the currently highlighted option.

Public Methods

NameParametersReturn TypeDescription
UpdateChatData data, bool displayOptionsvoidFilters connections, populates option labels, and optionally shows the options UI.
InputUpdateN/AvoidPolls NavigateUp, NavigateDown, and Advance input actions. On Advance, either advances the beat or selects the current option.
Displaybool activevoidShows or hides the options UI without recalculating the option list.
SelectOptionstring selectedOptionvoidConfirms the given connection entry ID, applies blackboard effects, and navigates to the target node.
DisposeN/AvoidUnsubscribes from input events and cleans up.