Skip to reading
GDScript Programming & Godot

OnDialogueStarted

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
On this page

Earlier edition reference / Current 0.86.4.0 property paths > p. 350

Code example
func on_dialogue_started(event: Dictionary = {}) -> void:
    Log(ToJSON(event))

A valid dialogue session begins, before its graph is processed.

Source table from OnDialogueStarted, page 298
Common contextUse and limits
dialogueId, playerId; inherited caller context may also be presentFilter dialogueId before adjusting a conversation camera or HUD. Starting the same dialogue from this handler can recurse. Keep listener work short when it must complete before the first line appears.

OnDialogueEnded#

Code example
func on_dialogue_ended(event: Dictionary = {}) -> void:
    Log(ToJSON(event))

A dialogue session ends, including interrupted endings.

Source table from OnDialogueStarted, page 298
Common contextUse and limits
dialogueId, playerId, interrupted; inherited caller context may also be presentCheck interrupted before granting a reward that belongs only to successful completion. Some explicit end paths can supply a blank dialogueId, so do not assume every payload identifies a normal completed graph.

OnInventoryChanged#

Code example
func on_inventory_changed(event: Dictionary = {}) -> void:
    Log(ToJSON(event))

An inventory mutation route reports an add, remove or quantity change.

Source table from OnDialogueStarted, page 298
Common contextUse and limits
characterId, itemId, amount, operationUse operation and the actual bag state together. amount is supplied by that mutation route; it is not guaranteed to be the resulting total. Adding/removing inside this listener can trigger another inventory event, so guard feedback loops.
Page 298 of 378Permalink
Go to page