ConversationInteraction ​
Inherits: Interaction < Resource
Interaction for dialogue/conversations with NPCs Uses the Conversation resource system with ConversationInstance for runtime state
Properties ​
int | conversation_id |
Variables ​
ConversationInstance | conversation_instance | null |
Methods ​
void | set_entity_reference( new_entity: Variant, p_system_hub: GameHost.SystemHub ) |
void | start_interaction( player: Player ) |
void | end_interaction() |
void | on_response_selected( response: ConversationResponse ) |
void | switch_to_interaction( target_interaction: Interaction ) |
ConversationInstance | get_conversation_instance() |
Dictionary | get_save_data() |
void | load_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