aboutsummaryrefslogtreecommitdiff
path: root/building_guide/objects.md
diff options
context:
space:
mode:
Diffstat (limited to 'building_guide/objects.md')
-rw-r--r--building_guide/objects.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/building_guide/objects.md b/building_guide/objects.md
index 110eb56..87b9710 100644
--- a/building_guide/objects.md
+++ b/building_guide/objects.md
@@ -120,9 +120,22 @@ talk:
- text: "\"What do you have?\""
goto: shop
- text: "\"Goodbye.\""
- end: true
```
+On-look action (runs when a player examines an object with `look <name>`):
+```yaml
+name: sign
+aliases: [notice, board]
+description: "A wooden signpost with faded writing."
+on_look:
+ set_player_flags:
+ read_sign: true
+```
+`on_look` fires the action AFTER showing the object's description. It uses the same
+`NodeAction` type as talk nodes — supports `set_player_flags`, `set_flags`,
+`give_item`, `take_item`, `teleport`, `heal`, `cost`, and everything else in the
+[node action reference](behaviors.md#node-action-reference).
+
See the [Talk section of behaviors](behaviors.md#talk-dialog-trees) for the full
dialog tree format. See [Stealable Objects](#stealable-objects) for theft mechanics.