The following screenshots show code that is not functioning as I thought they would. I attempt to set a blackboard value and then try to print the value and it comes up false in both scenarios. The only way I can set blackboard values is if I set it in a task or the controller itself.
The code is executed inside the pawn, but initiated from a task I believe so the blackboard itself is already initialized so I don’t understand the problem here.
Where it is updating the blackboard, you are just printing it before it shows that it is updated.
Maybe try using a different task to print it out so that it for sure makes it through the task and updates before it prints.
I would also double-check your behavior tree as it runs and make sure that the boolean value is not getting reset somewhere else.
Otherwise, I have seen multiple issues with booleans specifically in BT but I don’t remember exactly what the issue is, so you could try an enum, int, or other value?..hope this helps.
The print was just a debug addition. The blackboard value is not being set and it’s visible in the BT as such. If it were being set, the BT would run a different composite node which is not happening.