I did not create a behavior tree I just use the builtin concurrency stuff races, and syncs they have to basically create one in code.
For example rough psuedocode
_start_behavior()
loop //our main ai loop
race
_follow_path //follow waypoints unless an enemy is found
_detect_enemy // if an enemy is found this race is over goto the next stage of the ai
]
//we found an enemy follow and attack until we dont have one anymore other
race
_follow_enemy //follow the enemy unless he loses us or dies exit this race
_attack_enemy
] // once this race is over we got back to top of the loop and follow path etc.
]
They converted the butterfly example which is probably the more involved ai example they have and better than anything i have.
t/butterflies-are-skookum/282