How to cast to BTService in Thirdperson character?

Hello everyone,

I created a behavior Tree which uses a BTService_BlueprintBase called BTS_VisionCheck. I have created a Boolean inside the BTS_VisionCheck. Now, the question is in my third person character I want to get that Boolean condition to trigger a branch. I have tried cast to BTS_BlueprintBase but I am lost on what object to connect to the cast.

Thank you for your help.

So the solution for this:

1- In BTS_VisionCheck I created a public blackboard key variable, used set blackboard value as Bool and entered the key and the boolean.

2- In the Blackboard, I created a boolean variable.

3- In the behavior tree, I set the boolean in the service to the boolean in the blackboard.

4- In the AI controller, I used get value as Bool. The target was get blackboard and the key name was set to the blackboard key name using Make Literal Name.The return value was set to a new created variable in the AI controller.

5-Finally, in the third person character blueprint, I got all actors of class for the AI controller and used get to get the boolean value.


Another Solution:

1- In third person character, create a boolean variable.
2- In BTS_VisionCheck, Cast to third person character, and set the boolean variable.