[UE4.13] Unable to Acces Blakboard Values from Decorator

Hello.
So, I’m trying to create a test Decorator called Is_AI_Close_To_Player for my AI prototype and I am unable to access blackboard values from the Decorator BP, even though they are valid and set properly at Runtime.
Here are the values for the Player_Location key I expect to get when I try to get the values at runtime (Second Last Entry In Screenshot):

107312-ai_bot_runtime_values.png

However, when I print the values from the Decorator, I get the following values for the Player_Location key:
X=340282346638528859811704183484516925440.000

Y=340282346638528859811704183484516925440.000

Z=340282346638528859811704183484516925440.000

I’m using the Get BlackBoard Value as Vector Node to retrieve the value of the key and use it in the decorator.

Here is the setup for my Decorator:

Also, here is the relevant section of my Behaviour Tree. The Decorator in question is at position 10:.

I’m really at a loss at understanding where the issue is. Am I attempting to read the value of the key incorrectly? Or is it another issue?
Any help would be highly appreciated. Thank You.

Whenever you see X=340282346638528859811704183484516925440.000, Y=340282346638528859811704183484516925440.000, Z=340282346638528859811704183484516925440.000 in AI code it means the value is “invalid”, or in other words deliberately marked as not set. So the question is: how/where do you put player’s location into your Blackboard?

Cheers,

–mieszko

So, I’m setting the Player_Location key’s value only in the AIController BP. This happens when an OnPerceptionUpdate occurs. Funny thing is, at that point the values print out correctly. Here is the relevant node setup:

Also, at runtime, the Game Debugger (First Screenshot in original question) displays the correct values for the Player_Location Key in the Blackboard. However, to the Decorator, Player_Location is undefined at runtime. Is that suppose to happen, or am I missing something? Thanks.

Sounds like the issue is in the details of your setup. Maybe the key name used in the decorator is wrong? I’d suggest triple-checking everything and making sure stuff has expected values. Also, have you tried using vislog for debugging it? It something is set up wrong it might contain useful hints or will outright tell you! :smiley:

So, I rechecked all keys in my Decorator. They were fine. Just to be sure, I copy pasted key names from the blackboard into the Decorator BP key values. It still wasn’t working. Then, I tried a more explicit approach. Specified which Blackbard to use in the Decorator BP:

Then, I set the key names in the Getters in my Decorator BP accordingly and it’s working. I’m wondering why it’s working with this approach though and not the former one: Is it that the Decorator is unable to recognize whch Blackboard to use if a reference is not made in the code? I made no other changes in my Decorator BP aside from the one above. Thanks.

Use Blackboard call here is not needed, and can actually be harmful. What you need is Get Blackboard and use the component it gives you.

I’d love to debug the original issue you’ve encountered. If you could prepare a repro project I’d get right on it! If not, well, you have your workaround :slight_smile:

How can Use Blackboard be harmful in this context?
As for the repro project, I’ll replicate the project in a new UE4 project instance and see how it goes from there. Perhaps starting this in a new project might help. Otherwise, I’ll send it for debug. Thanks.