Setting up inheritance in Blackboards

Hello,

I’m creating an RTS where I’m trying to establish the behavior by using a Root Behavior Tree which has an injection tag where I place the current order’s Behavior Tree. The various Blackboards all inherit from the same parent BB which is the BB associated with the Root BT.

I thought that when I switched BB, the values which were already set (the rootBT) part would transition to the new BB but that is not the case… Is there anyway to do it without setting them individually (setting to aux vars and then injecting them in the new BB)?

If you inherit the blackboards, you already have the shared variables in the root black board as the inherited keys. Make all the shared variables in the root blackboard if you want them shared and you plan on switching BB’s (that inherit from the same BB) on the go.

Also, You would have to switch Behavior trees for different behaviors, I am not sure if you want to have the same BT but change BB’s, I’ve never come across the use for that yet. I don’t think is that is a good design, unless I understood your statement incorrectly.

I inject the behavior in the rootBT so I never change BTs, only the BB. The BBs all inherit from the BB of the rootBT. Despite sharing the same values, the values are not passed when I switch the BB.