diff options
| author | historia <[not public]> | 2026-07-09 16:09:35 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-09 16:09:35 -0400 |
| commit | b8c90886ef1f3afb8d908aac89028bd177836cae (patch) | |
| tree | 7e566a7e308e7531bbb7d6a3a39239e789f69a3c /building_guide/triggers.md | |
| parent | c705ae942573984784ef501bf8198f61f5206ddd (diff) | |
| download | thehouseoficarus-b8c90886ef1f3afb8d908aac89028bd177836cae.tar.gz | |
feat(admin): multi-select with shift+drag for common bulk operations
Diffstat (limited to 'building_guide/triggers.md')
| -rw-r--r-- | building_guide/triggers.md | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/building_guide/triggers.md b/building_guide/triggers.md index 69cd3d1..38dbda6 100644 --- a/building_guide/triggers.md +++ b/building_guide/triggers.md @@ -1,7 +1,28 @@ ## Triggers Triggers let you script a sequence of timed events that fire when a flag changes -value. They come in two flavors: +value. + +### Flags: Global vs Player State + +**Global flags** (`set_global_flags`, checked with `global_flag`) are shared by every +player on the server. A door opened by one player is open for everyone. A lever pulled once +changes the world for all. Stored in memory — lost on server restart. Numeric values are +compared by coercion (int/int64/float64 are normalized), so a YAML-decoded `3` matches a +code-set `int(3)`. + +**Player flags** (`set_player_flags`, checked with `player_flag`) are per-character. Quest +progress, "has read the sign," "paid the toll" — these are different for each player. Saved +to the character YAML and persist across logins. + +**Any flag change** — world or player, set from on_look, on_use, on_kill, talk nodes, +on-enter steps, exit on_traverse, trigger steps, or admin commands — can activate a +trigger. This is how you turn "player looked at the sign" into "spaceship landed and stairs +opened." + +### Trigger flavors + +Triggers come in two flavors: - **Room triggers** — defined in room YAML under a `triggers:` block. The room is the action context (broadcasts go to that room, mobs spawn there). |
