Announcement

Collapse
No announcement yet.

Pass vector value to Blackboard key

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pass vector value to Blackboard key

    I want the behavior tree task to find a new location within 2500 units of it's current location and within the navmesh area. As far as I can tell this is happening with what I have already. I can't figure out how to pass that new location to my blackboard asset so that the behavior tree can run.

    Here's what I have so far for my behavior tree task:
    Click image for larger version

Name:	Untitled-1.jpg
Views:	1
Size:	236.2 KB
ID:	1196199

    What am I missing that lets me pass the DesiredLocation back to my blackboard?

    #2
    You have two choices:

    1) From your AICon Ref, Get Blackboard -> Set Value As Vector (then Make Literal Name for the value name). This is less "messy" but it's prone to hard-to-debug errors if you then change the variable name in your blackboard because it will not cause an error.

    2) Create a Blackboard Key variable in your task, and make it public (I'm not sure you even have to make it public but w/e). Blackboard Key variables are basically a way to pass something between your blackboard and a node/task/service in your tree. You will now see an additional dropdown in your task node in the blackboard with the name of your Blackboard Key. You then pick from the dropdown to assign it to one of your blackboard variables. In your task, get your blackboard key var and Set Value As Vector on it.

    Comment


      #3
      Also, not related to what you asked but, if you override the Receive AI Execute function instead of just the Receive Execute, you will get an AI Controller output from the event so you can basically get rid of that entire upper white box.

      Comment

      Working...
      X