Page Info
Engine Version:

7. AI Controller Blueprint: Initial Blackboard Values

Choose your OS:

Now we need to set the "HomeLocation" key on the Blackboard. This is a more involved step.


  1. You need a Get Blackboard node and a Get Controlled Pawn node.


  2. Get a Reference to Self node from the Right-click context menu and connect it to the Get Blackboard node.


  3. Drag off the Return Value of the Get Blackboard node, search for "Vector", and create a Set Value as Vector node.


  4. Drag off the Return Value of the Get Controlled Pawn node and create a Get Actor Location node.


  5. Connect the Return Value pin of the Get Actor Location node to the Vector Value pin of the Set Value as Vector node.


  6. Drag off Key Name on the Set Value as Vector node and use Promote to Variable from the context menu.


  7. The variable should be awaiting a name in the My Blueprint panel, name the variable to HomeLocation.

    • If you clicked anywhere before naming the variable, you can rename it in the My Blueprint panel using the Right-click context menu.


  8. Compile the Blueprint.

  9. Select the HomeLocationKey variable in the My Blueprint Panel.

  10. In the Details panel, change its Default Value to the exact name of the Vector Value on the Blackboard, in this case, "HomeLocation"


  11. Connect the output execution pin of the Use Blackboard node to the input execution pin of the Set Value as Vector node.


In the next step we'll continue editing this graphs and add to this graph to make the AI Controller run the desired Behavior Tree.