Skip to reading
The Dialogue Designer

25. Change availability from an action or script

Edition 0.86.3.4

Build branching conversations with choices, conditions, actions, timed responses, voices, portraits and custom windows.

Download PDFView PDF page

Enable / Disable Dialogue Choice targets a specific response by dialogue ID, Choice node ID and Choice ID. It changes the explicit Enabled flag and refreshes an open menu.

Code example
await SetDialogueChoiceEnabled({
    "dialogueId":"archive_chat",
    "nodeId":"topics",
    "choiceId":"ask_key",
    "enabled":false
})

The same fields are available in an Action node and a visual-script action. Use it when the response should remain visible but unavailable, or when a script needs to apply a more involved rule.

Source table from 25. Change availability from an action or script, page 29
ReferenceValue
DialogueElias - The Locked Archive / archive_chat
Choice Node IDtopics
Choice IDask_key
Enabledfalse to disable; true to permit, subject to the other rules.

The complete guarded_talk example in Appendix B checks the saved loan flag, sets the response’s Enabled value and starts the conversation. A condition may still hide that response; enabling it does not remove its condition.

Read status, explicit Enabled and visibility conditions are separate rules. Resetting one does not silently reset the others.

Page 29 of 77Permalink
Go to page