PopochiuIDialog

Extends: Node

Description

Property Descriptions

active

var active: bool = false

Whether a dialog is playing.

trees

var trees: Dictionary

Stores data about the state of each PopochiuDialog in the game. The key of each entry is the [member PopochiuDialog.script_name] of the dialog.

current_dialog

var current_dialog: PopochiuDialog = null
  • Setter: @current_dialog_setter

Provides access to the dialog that is currently playing.

selected_option

var selected_option: PopochiuDialogOption = null

Provides access to the currently selected option in the dialog that is currently playing.

prev_dialog

var prev_dialog: PopochiuDialog = null

Provides access to the branching dialog that was played before the current one. I.e. Could be used to return to the previous dialog after exhausting the options in the currently playing one.

Method Descriptions

show_inline_dialog

func show_inline_dialog(options: Array) -> PopochiuDialogOption

Displays a list of [param options], similar to a branching dialog, and returns the selected PopochiuDialogOption.

finish_dialog

func finish_dialog() -> void

Halts the currently playing PopochiuDialog.

say_selected

func say_selected() -> void

Makes the Player-controlled Character (PC) to say the selected option in a branching dialog.

create_gibberish

func create_gibberish(input_string: String) -> String

Transforms any text to gibberish preserving bbcode tags

get_dialog_instance

func get_dialog_instance(script_name: String) -> PopochiuDialog

@deprecated Now it is [method get_instance].

get_instance

func get_instance(script_name: String) -> PopochiuDialog

Gets the instance of the PopochiuDialog.

set_current_dialog

func set_current_dialog(value: PopochiuDialog) -> void

Signals

  • signal dialog_started(dlg): Emitted when [param dlg] starts.
  • signal option_selected(opt): Emitted when an [param opt] is selected in the current dialog.
  • signal dialog_finished(dlg): Emitted when [param dlg] finishes.
  • signal dialog_options_requested(options): Emitted when the list of available [param options] in the current dialog is requested.
  • signal inline_dialog_requested(options): Emitted when an inline dialog is created based on a list of [param options].