Wandering Animal

Kode:
===Page 1 (name: "Wander"):===
[WHEN] "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] "detect", "player" [DO] "switch page", "Flee From Player"
===Page 2 (name: "Flee From Player"):===
[WHEN] "page entered" [DO] "jump"
[WHEN] "duration timer", "1" [DO] "play sound", "Animal Squirrel Chitter"
[WHEN] "detect", "player" [DO] "move", "away from", "it"
[WHEN] "no longer", "detect", "player" [DO] "switch page", "Wander"
Category:Default brain