Blackboard/BehaviorTree Key Bug

Hello, Im trying setup a simple AI system useing the AIPerception in c++, All went fine until I came to the point to setup a BehaviorTree/Blackboard in the editor.

Creating a key(s) in the blackboard and asign them to tasks in the behaviortree is no problem. But when you try to asign a Key to a task wich allready had a key asigned then the dropdown menu only displays the first key you had asigned.

If I delete the task and remake it and try to asign the key you want to the dropdown menu also displays the first key you had asigned. or it automaticaly snaps back to the same key. I also tryed to reset them to default, Save and close the behaviortree / Reopened it, And the same problem occurs again.

This makes setting up a behaviortree nearly impossible.

Anyone else can reproduce this to verify its not just me making some kind of mistake?

Blackboard Key Selector (the type we use for BB key selection dropdowns in BT nodes) has an option of filtering available keys by type so that a user cannot pick a key that’s incompatible in terms of type with what given BT node expects. Make sure the BB keys you want to use are of type appropriate for the BT node you’re want to use them with. A common mistake is to create ab Object key and try to use it as MoveTo goal, while Object is not a valid goal type on its own. The key needs to be configured to be of “Actor” type, it’s an option of Object-typed keys.

I recall there being a bug that made BB key selector’s behavior undefined when there no appropriate BB keys in BB asset, while the BT node requiring BB key selector pointing to something valid. I’m not sure we’re fixed that yet, and it sounds like you’re just hit that case.

If this doesn’t help some screenshots of your setup would help.

Cheers,

–mieszko

Maybe, I’m facing the same problem as yours.

I made 3 blackboad keys, which are all bool type. Names of the keys are ‘A’, ‘B’ and ‘C’.
Then I set the keys in Behavior Tree’s Node (services or tasks) using BB Key Selector. Ofcourse, names of the BB Key Selectors are ‘A’, ‘B’ and ‘C’, and set as bool type.

The key ‘A’ is collectly set and work propary in decolators and tasks in BT. However, keys ‘B’ and ‘C’ are Not work. Not collectly set in services or tasks, nor get so.

Maybe you make the same mistake as mine. BBKeySelectors must be “Editable”, and Set the Value on BT.

For example, when you make a key named “TargetLocation”, then make BBKeySelector (the name of which is anything you like, but value of which is NONE in this time) in somewhat service or task, and use it like… set as bool, get as vector or so on, you have to make the BBKeySelector “Editable” and set the value “TargetLocation” in the service or task node in BT.

If your problem is not occured by this mistake, I don’t know about it…cannot help.