B1-B2. Start and guard a conversation
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#
extends PCAScriptBasefunc run() -> void:
await StartDialogue({"dialogueId":"archive_chat"})Check the loan first#
extends PCAScriptBasefunc 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.
