Skip to content

ConversationInteraction ​

Inherits: Interaction < Resource

Interaction for dialogue/conversations with NPCs Uses the Conversation resource system with ConversationInstance for runtime state

Properties ​

intconversation_id

Variables ​

ConversationInstanceconversation_instancenull

Methods ​

voidset_entity_reference( new_entity: Variant, p_system_hub: GameHost.SystemHub )
voidstart_interaction( player: Player )
voidend_interaction()
voidon_response_selected( response: ConversationResponse )
voidswitch_to_interaction( target_interaction: Interaction )
ConversationInstanceget_conversation_instance()
Dictionaryget_save_data()
voidload_save_data( data: Dictionary )

Signals ​

conversation_ui_requested( conversation_instance: ConversationInstance, starting_chat: ConversationChat, interaction: ConversationInteraction ) ​

========== SIGNALS ==========

Property descriptions ​

int conversation_id ​

========== EXPORTED PROPERTIES ==========

Variable descriptions ​

ConversationInstance conversation_instance = null ​

========== RUNTIME PROPERTIES ==========

Method descriptions ​

void set_entity_reference( new_entity: Variant, p_system_hub: GameHost.SystemHub ) ​

Called by NPC when setting up interactions Creates the ConversationInstance here so it persists for the session

void start_interaction( player: Player ) ​

Starts the conversation for the player (the conversation instance, then the first chat).

void end_interaction() ​

Ends the conversation if it is running.

void on_response_selected( response: ConversationResponse ) ​

Called when user selects a response

void switch_to_interaction( target_interaction: Interaction ) ​

Switch to a different interaction on the same entity

ConversationInstance get_conversation_instance() ​

Get the current conversation instance (for save/load systems)

Dictionary get_save_data() ​

Get save data for this interaction's conversation state

void load_save_data( data: Dictionary ) ​

Load conversation state from save data Call this AFTER set_entity_reference has been called