aboutsummaryrefslogtreecommitdiff
path: root/building_guide/mobs.md
diff options
context:
space:
mode:
Diffstat (limited to 'building_guide/mobs.md')
-rw-r--r--building_guide/mobs.md32
1 files changed, 26 insertions, 6 deletions
diff --git a/building_guide/mobs.md b/building_guide/mobs.md
index 32ee408..c7331da 100644
--- a/building_guide/mobs.md
+++ b/building_guide/mobs.md
@@ -95,17 +95,37 @@ idle_descriptions:
talk: # inline talk config
nodes:
start:
- message: "\"Welcome aboard!\""
+ condition: # only show this node when flag is NOT set
+ player_flag: 1001_look_sign
+ not: true
+ message: "\"How can I help you?\""
+ goto: thanks # auto-advance here if condition fails
options:
- - text: "\"What should I do?\""
- goto: check_sign
+ - text: "\"Oh, nothing...\""
+ goto: sign_reminder
- text: "\"Goodbye.\""
- check_sign:
- message: "\"Review the safety information.\""
+ thanks:
+ message: "\"Thank you for flying with us. Be careful on the stairs.\""
options:
- - text: "\"Will do.\""
+ - text: "\"Thanks!\""
+ sign_reminder:
+ sequence:
+ - "\"Yeah, just us two! Not a lot of people heading into the belt these days.\""
+ - "\"But we'll be landing shortly! Look at the information sign so you'll know what to do.\""
+ options:
+ - text: "\"Okay, I'll take a look.\""
```
+When the player has `1001_look_sign` set, the `start` node's condition fails, so
+it skips directly to `thanks` ("Thank you for flying..."). When the flag is unset,
+the player sees "How can I help you?" and can choose to be reminded about the sign
+or say goodbye. The `sign_reminder` node uses a `sequence` so the flight attendant
+delivers two lines, pausing for the player to press enter between them, before
+showing the "Okay" option.
+
+See the [Talk section of behaviors](behaviors.md#talk-dialog-trees) for the full
+dialog tree format, including sequences and conditional nodes.
+
Protected mob with combat stats (for internal testing or debug purposes):
```yaml
name: "Guard"