Wandering Villager

Kode:

Page 1 (name: "Wander"):
[WHEN] "once" [DO] "team", "equals", "team 1"

[WHEN] "objects closer than", "10", "enemies"

> [WHEN] [DO] "move", "away from", "it", "at speed", "0.5"

> [WHEN] "else", "countdown timer", "2", "hold", "4", "loop" [DO] "move", "at speed", "0.15"

>> [WHEN] "countdown timer", "2", "loop" [DO] "turn direction", "equals", "random number", "1", "to", "2", "as integer"

>> [WHEN] "moving"

>>> [WHEN] "duration timer", "2", "loop"

>>>> [WHEN] "turn direction", "equal to", "1" [DO] "turn", "in direction", "right", "slowly"

>>>> [WHEN] "turn direction", "equal to", "2" [DO] "turn", "in direction", "left", "slowly"

[WHEN] "bump" [DO] "turn", "away from", "it", "quickly"

[WHEN] "interacted", "by", "player"

> [WHEN] [DO] "turn", "toward", "it"

> [WHEN] [DO] "switch page", "Talk"

Page 2 (name: "Talk"):
[WHEN] "page entered" [DO] "emote", "Talk"

[WHEN] [DO] "say", "Greetings, Adventurer!"

[WHEN] "countdown timer", "4" [DO] "switch page", "Wander"