Unable to get reference to blackboard from different actor

Hello. I am struggling with getting the reference to a blackboard despite being able to get the reference to the AI controller to which the blackboard is associated. Each time I try to “get blackboard” it fails and posted an error: Blueprint Runtime Error: “Accessed None trying to read property Blackboard”. Node: Print String Graph: EventGraph Function: Execute Ubergraph BP Tripod Controller Blueprint: BP_Tripod_Controller

I have character (BP_TP1) which is controlled via an AI Controller (AI_TP1) and a Behaviour Tree (BT_TP1) with it’s associated blackboard (BB_TP1)

I have an actor (BP_Tripod_Controller) that I want to access the BB_TP1 blackboard and update values within it depending upon different situations. The controller will act like a battlefield commander and pass orders to various units depending upon different needs.

This is the blueprint (within BP_Tripod_Controller) which is failing with the accessed none error:

I’m getting all the instances of BP_TP1 with a Tag of available and trying to read the “i_current_task” variable from it’s associated blueprint. It successfully gets the AI controller but fails to get the reference to the blackboard which it lists as unknown.

Any suggestions? thanks!!

Hey @robdav1969!

So first I would attach the Blackboard output to a printstring to see if it returns the name of the Blackboard. Because then you know if it’s having issues getting a value from the BB, or the BB itself, tightening the scope. If the Blackboard name prints, check the literal name and make sure it’s identical, even spaces will mess it up.
Also if “AI TP1” is an AI controller, there’s no need to “Get AIController” the 2nd time, better to pull off of “As AI TP1” and use “Get Blackboard” from there. :slight_smile:

Try that stuff and let us know how it goes! :slight_smile:

Thanks @Mind-Brain!

I’ve removed the extra Get AI Controller as, yes, it wasn’t really needed.

I’ve also done as you have suggested and pulled a print string straight out of the get blackboard to see if that returns anything.

As you can see from the output log it doesn’t pull through anything to the print screen from the get blackboard. It also doesn’t throw the “Accessed none trying to read property Blackboard” error either.

Just for piece of mind I created a new AI Controller, Behaviour Tree, and Blackboard and this still does not return any thing when attempting to get the display name.

I then tried to read the value of a blackboard key (i_check which has a default value of 999)

What is seen here is that it throws the “Accessed none trying to read property Blackboard” error but also returns 0 instead of 999 via the print string.

Quick update:

I continued reading other posts about the same or similar issues and came across a post that states that if you try to access a blackboard before the behaviour tree is initalized it will not work (or words to that effect) (post is here: Accessed none trying to get blackboard - #5 by 7efnawy)

Anyway, as a test added a delay between the BP_Tripod_Controller Begin Play and the function which interacts with the blackboard to see if that makes any different.

This resulted in no accessed none error and it pulled through the correct value from the i_check variable in the blackboard.

Therefore it would seem that I was being a little hasty when trying to interact with a blackboard that wasn’t yet initialized!

Solution: Give Run Behaviour Tree a little time to get its house in order before trying to interact with the blackboard!!

Thanks for your input @Mind-Brain :slight_smile:

1 Like