While following the Behaviour Tree quickstart I ran into a few issues with default values which I eventually managed to resolve, but still leave me a bit confused.
The biggest confusion is when I create a new custom
Task and a
Set Blackboard Value as X node in it where I promote the
Key input to a variable
Going back to the Behaviour Tree and selecting the Task I now have to set the “Default value” for this variable to be the name of the Blackboard variable. Now I understand why I don’t set this inside the task definition, since it could be used with different Blackboard variables. But what is extremely confusing to me is why is this called “Default”, when it’s something like a reference to the actual variable in the Blackboard? Is this so that I could change it to a different key at runtime?
But what is even more confusing is the
Set Value as Object with a target of
Blackboard Component. I guess I got carried away in this case by the fact that the tutorial names the
Variable Name the same as the Blackboard variable, but the actual lookup is done based on the variable’s value, hence the need for the
The problem I had with these, why I was left confused, and also why I’m asking here, is also that I have no idea how to properly debug this? I’ve used the AI Debugger (
' ingame), tried setting breakpoints, and printed values, and was ultimately just confused by everything being printed and ran correctly, but the Blackboard not being updated. Is there anything that lets me maybe inspect that I’m setting a Blackboard variable that doesn’t exist or something like that?