How do you change a black board variable in a behavior tree task in event graph?

I created a blackboard bool variable called AiDoStream. The purpose of this bool is to trigger true once the AI visits the stream to prevent it from returning. The behavior tree task handling the bool change is AiVisitStream. In AiVisitStream I’m struggling with 2 solutions.

The first solution is I create Event Receive Execute AI. I then create a variable called AiDoStream. I assign it as a black board key selector. I mark it as public and instance editable. I drag it into the graph selecting get. I then create the function Set Black Board Value As Bool and connect it with my variable AiDoStream. I check mark the lil red box cuz I want my variable set to True. I then create Finish Execute, check mark its success box, and then hook all my execute lines up. I then compile and run. But, after my AI executes the task my variable doesn’t change.

The second solution is I create Event Receive Execute AI. I create a function called Set Value As Bool. I check mark the lil red box cuz I want my variable set to True. I create a Make Literal Name function and in the text box I put the name of my variable AiDoStream. I connect it to Set Value As Bool function. I create the function Get Blackboard and also connect it to my function. On the other end of Get Blackboard there is a blue pin called Target. This is where I get lost. I’ve tried all sorts of configurations including casting, and creating object variables to plug into it. Nothing works.

What makes this so challenging is every example I find online deals with accessing black board variables on actors. Whereas I need to access them in behavior tasks. If someone could kindly give me an example of the proper way to wire this up, I’d be extremely grateful!

Additional info: My AI and its components is called NPC and it’s parent class is Character. The stream my AI is running to is a blueprint actor. My player and its components is ThirdPersonCharacter and it’s parent class is also Character.

For example, you have a bool in the BB:

305350-1.jpg

To set its value in a task, you just need to:

And to get its value:

305362-3.jpg

Thanks! Once I saw your example I quickly was able to pin point the area that was messing me up. I had another black board selector variable called Vector which was also in the AiDoStream task. I didn’t mention it cuz I didn’t want to make my problem more complicated then it needed to be. When I’d go to my behavior tree I’d just see the Vector variable but not my new AiDoStream variable in the details pane. This confused me cuz I had marked both variables as public and editable. It wasn’t until I clicked back and forth in the details pane that it showed my AiDoStream task variable. I was then easily able to click it and match it up with my AiDoStream black board variable. So, if anyone is wondering why after they create a new public variable it doesn’t show up in the behavior tree its probably cuz you already have the window open and just need to click back forth in it for the window to update the new information.

I had been working on this problem for like half a day! Its amazing something so simple could cause so much trouble.

EvilCleric, I really appreciate the help!!!