Attempting to Add Blackboard Keys Dynamically

I was attempting to learn how to generate blackboard keys dynamically using only C++. I got lost in the documentation and decided to revert to Blueprint for the time being.

As a bit of context, what I want as an end result is to place some target points around the level and apply tags to them to group them appropriately to set up the guard’s navigation system. For instance, patrol waypoints for Guard A would be tagged “GuardA” and where he is supposed to spawn would be tagged as “SpawnPoint”. I have the dynamic loading of the guards/controllers working how I want it to, but I am having trouble associating the waypoint objects with the guard controller’s blackboard.

This is where I switched back to blueprints. I will attach the screenshot I have of the controller’s blueprint below. When I run the game I don’t even see a list of Guard’s in the Blackboard’s “select debug object” drop down list, so I’m definitely missing a step if nothing shows there.

All of the tutorials I have seen explain how to define guard behavior patterns set up statically in the editor. I plan on switching back to that if need be, but I was hoping to figure out a better way of approaching this problem. My question then is how to people normally approach dynamically generating all the components that make up a behavior tree.


  • “Load Onto Blackboard” is a terrible name for what that function does, it’s left over from when I was attempting to do this purely in C++. Currently, it takes the controller’s pawn, makes sure it’s a GuardCharacter_C and assigns it to the controllers Guard object.