Creating target positions for squad

I want to create a squad of units following their leader. For that I’m creating an array of target points derived from my leader’s location and let my followers each pick one point to follow. I haven’t really gotten the hang of blueprints yet so I’d like to ask some assistance; what’s wrong with this setup:

  • I’m creating the target points onBegin and insert them into my array and updating their positions each tick
  • the array is exposed and my (only) follower is accessing the first of those to move to it
    (the moveToActor is just a leftover, pls ignore)

am i making some obvious mistake or am i missing some BP formalism here?

you are always choosing slot 0 in your array of positions… it says so right on the node :slight_smile:

Try using a “Random Integer” node for the index.

that’s why i pointed out I only have a single follower, so my expectation is that the first entry of the array, slot 0 should provide one position for my one guy to follow. arrays do start with line, don’t they?

Only found now that I’m still getting an ‘Accessed None’ error. In the Direct Blueprint Communications section of the UE reference it says that I need to set the instance of the blueprint I want to access, but with my BP being on my character i can’t set the entry in the details panel.
What do i have to do to to make my array accessible from one character blueprint to another?

Well, you asked what was wrong with the setup… and that is the only thing I can see that is wrong. you didn’t us how it failed before now.

And I think we need more info to help you.


Check this tutorial, maybe it helps.