Flag GatingProgression

A boolean or enum stored in global state determines whether an event, path, or interaction is currently available.

A stored boolean gates the path: throwing the switch flips the flag from false to true and the closed gate lifts — no item needed, just world state.

How flag gating works in Godot

There's no “flag” node — gating is a pure data pattern. You build it from these primitives:

Dictionaryprimitive

The in-memory flag store. snake_case keys double as readable identifiers and save keys; read with get() and a default so missing flags are simply false.

var flags := {}
flags["bridge_repaired"] = true
if flags.get("bridge_repaired", false):
    open_path()

Resourceprimitive

Wrap the flags in a custom Resource (a GameState) so the whole set saves to and loads from disk as one object via ResourceSaver / load.

class_name GameState extends Resource
@export var flags: Dictionary = {}
# save: ResourceSaver.save(state, "user://save.tres")
# load: load("user://save.tres")

Signalsprimitive

Emit a signal when a flag flips so gated doors and objects react the moment state changes, instead of polling the dictionary every frame.

signal flag_changed(name, value)

func set_flag(name, value):
    flags[name] = value
    flag_changed.emit(name, value)

In short: flags: Dictionary in GameState autoload; check_flag(key) called before enabling any interaction; set_flag(key, value) on events

Retro games that use flag gating

66 catalogued game(s) use this mechanic, spanning 1986–1999.

Related progression mechanics

▶ Explore Flag Gating interactively — see every game + the Godot system