Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Move Ai Agents to array of locations

I am trying to create a behavior tree that will distribute n ai agents to n number of points around the circumference of a circle, using blackboard data.

alt text

I have generated an array of vectors for each location and can pass it to my blackboard, but my agents simply all move towards the last entry in the array. Is there a way to store an array of vectors in a blackboard key, and have my Ai agents check their own index number and get the corresponding vector location from that array?

Ideally I would like to have potentially hundreds of simplistic Ai agents all running around doing their thing, getting positioning data on the fly from terrain changes or user input, so passing location data to some or all of them quickly and efficiently is really my biggest goal. If there is a smarter way to do what I'm trying to do, then I'm totally open to the suggestion.

alt text

Product Version: UE 4.16
aicontroller.jpg (101.5 kB)
behavior tree.jpg (74.5 kB)
more ▼

asked Aug 02 '17 at 01:59 PM in Blueprint Scripting

avatar image

1 2 2

avatar image ben.sizer.sumo Aug 08 '17 at 01:32 PM

Looks to me like you're just writing each vector in the array to the exact same blackboard key - so obviously the last one will be the one that ends up staying stored.

I suspect the workaround you need is this one: https://answers.unrealengine.com/questions/169889/can-blackboards-have-an-array.html

avatar image pahzie Aug 10 '17 at 12:54 PM

Thanks for the info, though I'm afraid I don't fully understand how to implement that answer. I haven't touched C++ very much and frankly am not sure what to do with the custom class I created or even how to access it in blueprint/blackboard. Could you shed any more light on the subject?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question