Blackboard issue UE4.12

Currently i’m programming an AI using BT and Blackboard and all works great. Then, i added two instances of the AI and all keeps working but when i close and reopen the project i realized the two IAs doesn’t work fine, they have a weird behaviour and i realized that the blackboard values was overwritten, I mean, if i have Two instances of AI there are two instances of AI_Controller and two blackboards, but when i set blackboard value in one AI , this value is set in both blackboards. I did a quick test to reafirm this, so first i create int value called "test"in blackboard i initialized this test value in AI_Controller with random int, when i hit play i verify that two blackboard have different values and all it’s okay, BUT when i reopen the project and hit play and i realized the test value in both blackboards is the same always(the value in the second blackboard instance is overwritten).I tested this in UE4.10 and it worked perfectly every time, even when I reopened the project, but with UE4.12 it only works on the initial launch after compiling and the test value is overwritten if I close and reopen the editor.

Hello,

I have not been able to reproduce this issue on my end using 4.12.5

Here’s what I did:

  1. Created a new pawn
  2. Created a new AI Controller
  3. Created a new Blackboard and Behavior Tree
  4. Added a integer key to the blackboard
  5. Recreated the setup in your blueprint in my AI Controller
  6. Added the AI Controller to the Pawn
  7. Placed two instances of the pawn in the level
  8. PIE (Values were random as expected, I printed them to the screen)
  9. Restarted the editor
  10. PIE again (Values were still random as expected)

Am I missing a step anywhere? Could you provide a detailed list of your steps?

Here’s what I did(It’s almost the same ):

  1. Using 4.12.5 Open third person template
    2.Create a new Character Blueprint (AI)
  2. create new AI controller and assigned to Character blueprint(AI )
    4.Created a new Blackboard and Behavior Tree
    5.Added a integer key to the blackboard, assigned blackboard to Behavior tree.
  3. Set up the AI controller as i shown before
  4. Placed two AI instances of the character(AI) in the level

When i hit play and switch between controllers on Behavior tree (CONTROLLER_AI_C1 and CONTROLLER_AI_C2), Both of them always has the same test value(i mean the test value always changed but both controllers always had the same value) and each Controller should have his own value.This is the issue.

I tested in 4.10.4 in the same way that i did before and when i switch between Controllers each one always had different test value as expected.

Thanks for providing the additional information. I am still not seeing the same results in my project unfortunately.

I made a change to my AI Controller setup. Give this a shot:

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

I am having this exact same issue. I have multiple AI guards placed in my level and they seem to all use the same blackboard. I have an “InitialWaypoint” variable I set (to a different waypoint) on each guard in the level - but when play starts they all go to the same waypoint. It looks like they are either all sharing one blackboard - or the last blackboard/behavior tree to initialize is overwriting ALL the blackboards with the same data. After several days of frustration I moved to a workaround where I store all data on variables on each AI controller. This works but I’d rather use be using blackboards as this is what they are for!

Edit - Sean, I tried using the Use Blackboard node (as suggested above) to create a blackboard component but the problem persists.

Aaaaaaannnnd fixed it literally 5 mins after previous post. Typical. On the blackboard make sure “Instanced Synced” checkbox is off for variable you don’t want to share.

I credit this post:

That’s a handy feature but when did it get added and why wasn’t it off by default?

Hey Michael,

Would you mind providing the project so I can take a look at the setup? I’ve not been able to see this issue in my own projects in the past, so I feel this is the best course of action. You can zip it up, upload it to Dropbox, and provide a link to me through PM on the forums: https://forums.unrealengine.com/member.php?160394-Sean-Flint

Instanced Synced should be off by default. If you create a new blackboard, add a new key, and take a look in the details panel, you will notice that the variable is not set to true by default. Is this the same behavior you’re seeing?

Yup I checked and the default for Instanced Synced is off. Somehow all my keys had it on and I’m pretty certain I didn’t do that intentionally. Regardless I am so happy to have solved it. Two days of banging my head against the wall over :slight_smile: Thanks for your help Sean!

Just to note, today I am finding that newly added keys are being created with Instanced Synced on by default. I created a new blackboard in my project and started adding keys. They all had Instanced Synced on by default.

owwww , of course!!! thank you very much guys…