B3. Grant the key once
Expose grant_key as Give Archive Key Once, with no parameters. Call it from the reward branch instead of also keeping the old unconditional Add Inventory Action.
extends PCAScriptBasefunc grant_key() -> void:
if bool(Runtime.variables.get("archive_key_given", false)):
return
if not HasInventory("archive_key"):
await AddInventory({"itemId":"archive_key", "count":1})
await SetVariable({"name":"archive_key_given", "value":true})Use your actual dialogue, node, Choice, item and variable IDs. Save the authored script before testing it.
