I only have one blackboard! and after all this and it’s still false! what’s going on here? I’ve been stuck for 4 days now, please only answer if you can provide confident answers.
How do you know? Is “SelfActor” the same actor in both cases? Print its value both when setting and when reading. Print the blackboard path/display/instance name, too.
One of two things are happening:
You’re setting the boolean on a different instance of the same blackboard class than what you read from
The value gets cleared by some other code path before you read it
My guess is it’s #1, perhaps PlaySeqFromBT is not the same object as AIController_Spawner?
to answer your question it is being run within my character blueprint inside a component and yes, this code is working, I just can’t access the blackboard key.
It’s probably the case that you have multiple object instances.
This happens when you spawn multiple objects, OR when you’re doing networked game development.
Sorry I am a beginner and I did not know this, thanks for letting me know. So if I understand correctly you are saying I am not accessing the blackboard key correctly? can you let me know how I could get that same instance of the blackboard I want? I never heard about this and I can’t find any help on it unfortunately.
You let the AIController create the blackboard (typically from the behavior tree.)
Then you use “get blackboard” in all the other components.
The “get blackboard” Blueprint function takes either a Pawn or an AIController object, and will find the corresponding blackboard component from the AIController.
I wanted to check if I’ve understood everything you have said so far correctly. Right now my component that contains my ai controller and behavior tree can be assigned to many different actors on my level. In my level there are about 3 altogether using it which creates multiple instances, as you said. So therefore I cannot access a specific blackboard key because it is creating 3 different blackboard instances so therefore I cannot exactly access it directly because it’s not possible.
is this correct?
I apologize for bothering you once again please know I appreciate your help with this issue.
A blackboard key is typically “in context of the particular actor that’s being controlled.”
Just because one actor has seen the player, doesn’t mean that all actors have seen the player.
However, there’s actually a way to get the blackboard to behave like you say – if any one actor changes the value, everyone sees that change. This frequently leads to hard-to-control behavior, but if there’s some global state like “the base is on lockdown alert” that you need, it’s a convenient way to model that.
To get that behavior for a particular key, check the “Instance Synced” property for the key in question: