Default value for BTT Blackboard keys.

Is there a way to set the default value for blackboard key selectors in a Behavior Tree Task?

When I look at the Default Value parameter in details panel for the key the only option is None.

It’s quite easy to forget to set the key when reusing a node multiple times.

2 Likes

Hi, have you found a solution to this yet?

Hey, sorry to bump a super old thread, did you ever find the solution to this? :smiley:

Based on what I’ve read, I think you are NOT supposed to be able to set the blackboard key within a node. It’s not really a bug but it is just showing that you can’t set a default./

I think the reason for this is because different nodes can use different blackboard values for nodes that are replicated elsewhere. Anyways, thought I’d bump with my comment - it is a little frustrating but I think ultimately more powerful.

The easy way to do this is:

  • create a variable for the Blackboard Key Selector in the graph for the task where you are setting it
  • set this variable to be “instance editable”
  • now go back to the tree that calls this task. on the node for the task, you will be able to pick the value for the key from the menu

I believe that this is because the task doesn’t know which tree it will be used in. So you need to promote this variable up so that you can set it at the tree level.

1 Like