Hi, after reading almost everything related to Behaviour Trees on aigamedev site I started to think how to implement it.
It looks like each agent in the game can have its own BT which it updates every frame. But what if many agents share the same behaviour (so they have their own copy of the same tree)? Isn't it a good option to have only one instance of the tree and each agent passes its pointer to the tree during update? This way decision/behaviour logic will be the same, but it will also depend on current owner state because each node will have access to "owner->blackboard->some_data" etc.
The same way I could use small behaviour subtrees (e.g. "attack_with_machine_gun") in different trees. So there would be one instance of "attack_with_machine_gun" but each main tree could use it during update by passing its current owner pointer.
Or this idea is completly wrong...?