Set Blackboard value not working

Hi.

I am trying to make an AI for a character to shoot at player when he is visible, in range, etc. I have set up a service for checking for visibility which works fine, but it seems impossible to set the appropiate key in the blackboard. As you can see in the picture, the key is set as true, but getting the value just afterwards returns false.

What am I doing wrong?

Im not sure if this is the right way to do it. There is a component for sensing the player - explained here - YouTube If you do it as outlined in your question, you might get problems with more enemy entities? Or maybe you build on that sensing already?

For the BB key, maybe it needs to be a boolean type of variable? Or maybe this is outlined here https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/6/index.html

Though, i want to know how you setup the AI weapon and shooting. Probably similar to the character once in a given range.

My problem is not sensing the player, as you may see from the captures, mys sensor detects if the player is hidden, behind, out of range or visible by the AIBot, the problem is that I can’t set the variable “IsVisible” in the blackboard, where it is of course of type boolean.

For the sooting part, my bot has a custom event that aims and triggers the firing system that is part of the weapon blueprint.

http://i.imgur.com/uH0IFEl.jpg

.

http://i.imgur.com/jHLDQoH.jpg

http://i.imgur.com/yHhgEEn.jpg

Solved.

I just missed to pair variables and key values in the details of the detector.

http://i.imgur.com/57VzPET.png

Aha, that’s what I was missing. And don’t forget to set the key as public in your task/service/whatever blueprint!