Skip to content

ConversationChat ​

Inherits: Resource

A single chat in a conversation References responses by ID instead of nesting them

Properties ​

intid0
Stringtext"":
SFXSelectionvoice_line_sfx
AnimationSelectionSocialanimation
Array[int]response_ids[]
boolallow_end_conversationtrue

Methods ​

intget_response_count()
intadd_response_slot()
voidremove_response_slot( slot_index: int )
voidset_response_at_slot( slot_index: int, response_id: int )
intget_response_id_at_slot( slot_index: int )
boolis_slot_connected( slot_index: int )
intfind_slot_for_response( response_id: int )

Signals ​

response_slot_changed( slot_idx: int ) ​

Property descriptions ​

int id = 0 ​

The id of the chat.

String text = "": ​

Text to display (the text of the source language: the other languages are translations in the Localization tab)

SFXSelection voice_line_sfx ​

The voice line to play with the chat. It is the line of the source language: a line in another language is the file of the same name in the language folder of the character

AnimationSelectionSocial animation ​

Animation to play on interact

Array[int] response_ids = [] ​

Response IDs in order (references to Conversation.conversation_responses) Null values (0) represent empty/unconnected slots

bool allow_end_conversation = true ​

Adds <End Conversation> default ConversationResponse to chat

Method descriptions ​

int get_response_count() ​

========== HELPER METHODS ==========

int add_response_slot() ​

Adds an empty response slot. Gives its place.

void remove_response_slot( slot_index: int ) ​

Removes a response slot.

void set_response_at_slot( slot_index: int, response_id: int ) ​

Puts a response in a slot.

int get_response_id_at_slot( slot_index: int ) ​

The response in a slot (0 when it is empty).

bool is_slot_connected( slot_index: int ) ​

Does the slot hold a response?

int find_slot_for_response( response_id: int ) ​

The slot that holds this response (-1 when none).