Skip to content

Instantly share code, notes, and snippets.

@Beyamor
Created October 21, 2013 19:27
Show Gist options
  • Save Beyamor/7089459 to your computer and use it in GitHub Desktop.
Save Beyamor/7089459 to your computer and use it in GitHub Desktop.
@behaviour = bt.forever(
bt.branch(
bt.cond(
bt.checkOnce(
behaviours.closeTo(this, (=> @player), 50)),
behaviours.flee(this, (=> @player),
speed: 300
minDistance: 150
)
),
bt.loop(
bt.randomDelay(0, 1),
behaviours.wanderNearby(this,
radius: 100
speed: 200
timeout: 1
threshold: 20
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment