aboutsummaryrefslogtreecommitdiff
path: root/building_guide/triggers.md
diff options
context:
space:
mode:
Diffstat (limited to 'building_guide/triggers.md')
-rw-r--r--building_guide/triggers.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/building_guide/triggers.md b/building_guide/triggers.md
index 0d227bd..69cd3d1 100644
--- a/building_guide/triggers.md
+++ b/building_guide/triggers.md
@@ -39,13 +39,13 @@ and the object are cleanly separated. The sign is a local object in room `1001`:
objects:
- name: sign
on_look:
- set_player_flags:
- 1001_look_sign: true
+ - set_player_flags:
+ 1001_look_sign: true
```
This separation is deliberate. The object sets flags. The trigger watches flags.
-Any system that sets a player flag (`on_look`, talk nodes, on-enter steps, exits,
-use interactions) can activate a trigger watching that flag.
+Any system that sets a player flag (`on_look`, `on_use`, `on_kill`, talk nodes,
+on-enter steps, exit `on_traverse`) can activate a trigger watching that flag.
---
@@ -396,8 +396,8 @@ advances a numeric flag through stages. The last stage spawns a boss.
# data/objects/unique/5001_body.yaml
name: body
on_look:
- set_player_flags:
- investigation: 1
+ - set_player_flags:
+ investigation: 1
```
**Step 2: Blood trail in room 5002** — room trigger fires on value 1
@@ -504,12 +504,12 @@ All of these paths activate triggers:
| Source | Example |
|---|---|
-| Object `on_look` | `look sign` sets `1001_look_sign: true` |
+| Object `on_look` / `on_use` | `look sign` sets `1001_look_sign: true` |
+| Mob `on_kill` | Killing a boss sets `boss_slain: true` |
| Talk node actions | NPC sets `quest_started: true` after accepting |
| Talk option actions | Player selects a choice that sets a flag |
| On-enter steps | Room entry sets `1001_welcome: true` |
-| Exit traversal | Walking through an exit sets `boarded_shuttle: true` |
-| Use interactions | `push button` sets `gate_open: true` |
+| Exit `on_traverse` | Walking through an exit sets `boarded_shuttle: true` |
| Trigger steps | One trigger chain-sets a flag for another trigger |
---