How to set Blackboard Value in Task

Hey,

I’m having trouble with my behavior tree.
I have a task, calculating an index (interger) and I want to store this int for further actions in my blackboard.
I have no problem saving blackboard values from any other blueprint, because I just need to call “Set Value as int” and parse a String with the exact variable name.

But from the blackboard itself it’s not so easy anymore, if I want to “Set Value as Int”, the function wants a “Blackboard Key Key Selector Structure” as input type.

So, how do I get my int value in my blackboard, my naive try was to create a “key” like the string before, where I just write the same name. But that doesen’t work.
I neither can change the default value and the other checkboxes seem uselees too for me.

This is my Setup:

108925-blackboard.png

108927-details.png

1 Like

Your NextGoal variable in your task is not the same as your NextGoal variable in the blackboard, you need to link them.
You need to set the NextGoal variable in the task to editable, then when you call this task in the behavior tree, select the task and go to its detail pane, and set the NextGoal drop down to your NextGoal variable

5 Likes

Super, that’s what I’m looking for

This was exactly what I was looking for! Would have taken forever to figure that out… Thanks!

Thank you. That solved the issue