Creating a behavior tree object