Skip to reading
PCA Script Programming

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. 329

Code example
when dialogue elias_intro starts
    log(to_json(event))
end

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

Source table from OnDialogueStarted, page 296
Common context keysUse 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
when dialogue elias_intro ends
    log(to_json(event))
end

A dialogue session ends, including interrupted endings.

Source table from OnDialogueStarted, page 296
Common context keysUse 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
when inventory changes
    log(to_json(event))
end

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

Source table from OnDialogueStarted, page 296
Common context keysUse 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 296 of 357Permalink
Go to page