Creating a Blackboard
Blackboards define the local variable space for Behavior Trees. These Blackboards can also sync with other instances of the same Blackboard. Blackboards can be created first because you'll find yourself modifying them often until you discover everything you need for your Behavior Tree.
We will create our Blackboard data first and then supply it to our Behavior Tree. Now, let's start! Here are the steps:
Right-click on the Content folder and create a new folder named
AI
.Now, right-click inside the folder and scroll down to find Artificial Intelligence; then, click on Blackboard. Let's name this
EnemyData
.We will open
EnemyData
and then create two object variables to be used by Behavior Tree. Name the first oneTargetActor
and the next oneCurrentRoute
.Note
In case you're using Enumeration, you can define the enumeration the same way we will define actors for these objects.
Click on TargetActor and select the Key Type option in the drop-down menu. Then, change the Base Class...