Skip to reading
The Dialogue Designer

B1-B2. Start and guard a conversation

Edition 0.86.3.4

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

Download PDFView PDF page
On this page

Use the first recipe for a direct start. The second sets explicit availability from the saved loan flag before starting.

A direct start#

Code example
extends PCAScriptBase
Code example
func run() -> void:
    await StartDialogue({"dialogueId":"archive_chat"})

Check the loan first#

Code example
extends PCAScriptBase
Code example
func run() -> void:
    var already_given: bool = bool(
        Runtime.variables.get("archive_key_given", false))
    await SetDialogueChoiceEnabled({
        "dialogueId":"archive_chat", "nodeId":"topics",
        "choiceId":"ask_key", "enabled":not already_given
    })
    await StartDialogue({"dialogueId":"archive_chat"})

The original option condition still applies. Disabling a response and hiding it with a condition are separate rules.

Page 69 of 77Permalink
Go to page