Simple AI with Behavior Trees - Agro?

I agree, I’d just use a Selector where Peter used Sequence, and make the Patrol a Sequence. The main reason for it being that with the original setup you’d end up with the whole sequence failing if “Found Enemy?” failed, unless you added a kind of “always succeed” decorator on top of it. Needless complication. Use this:

I’d also suggest making the “Found Enemy?” condition simple Blackboard-based check if your Enemy key is set or not (and you course you’ll need to be writing your AI’s enemy information into blackboard).

Cheers,

–mieszko