21 lines
678 B
YAML
21 lines
678 B
YAML
|
|
example:
|
||
|
|
commands:
|
||
|
|
on_template_apply:
|
||
|
|
- say --range 15 Hello!
|
||
|
|
- npc command add say Hello again!
|
||
|
|
behavior_tree_example:
|
||
|
|
traits:
|
||
|
|
-
|
||
|
|
name: behavior
|
||
|
|
tree:
|
||
|
|
sequence:
|
||
|
|
- if `npc.spawned`:
|
||
|
|
- cooldown patrol 10s
|
||
|
|
- loop `memory.get('patrol_count', 0) < 3`:
|
||
|
|
- print Patrolling area `memory.get('patrol_count', 0)`
|
||
|
|
- walkto `npc.x + 5` `npc.y` `npc.z`
|
||
|
|
- wait 2s
|
||
|
|
- walkto `npc.x - 5` `npc.y` `npc.z`
|
||
|
|
- set patrol_count `memory.get('patrol_count', 0) + 1`
|
||
|
|
- print Patrol complete!
|
||
|
|
- forget patrol_count
|