blueprint help

hello to all.

i was wondering if this is possible with blueprint.

i have 11 vector variables…
namely : loc0, loc1, loc2, loc3, loc4, loc5, loc6, loc7, loc7, loc8, loc10

an array of actors…

so, i want to send all actors in the array to each location, depending on their index number…

index [0] to loc[0]
index [1] to loc[1]
index [2] to loc[2]
index [3] to loc[2]
index [4] to loc[4]
index [5] to loc[5]
index [6] to loc[6]
index [7] to loc[7]
index [8] to loc[8]
index [9] to loc[9]
index [10] to loc[10]

Make an array for the vectors as well, then ActorArray.ForEachLoop Array Index Pin -> Get Index From LocationsArray -> Set Actor Location

It will make more sense when you pull the Nodes out but basically for each actor index number get the equal index number from the location array and set actor location for array element.

What you mean by “send actor to location” is actor a pawn that you want to walk there or some mesh that you jjust want to snap to location?
Or you want some code that makes all actors wander randomly to one of those locations?

i want the actors on the array , go to each of the location corresponding to their array number…

im trying to make a blueprint interface, butis having hard time on the logic…

inputs are

  1. all the location provided… loc1-10
  2. array length of the character array
  3. index of the for each loop

if the character is in array [0] - it goes to location [0]
if the character is in array [5] - it goes to location [5]
if the max length of character array is reach, it stops…

got it to work… but not sure how optimized it is…

That method is certainly not optimized, here is a node you may want to use:

After placing the select node, you can right click on it to add more pins. Whether or not this node will be useful depends on what your needs are, but I believe it may work in your case.

wow, i never knew select node existed…
hmm, this is helpful, so… the index what ever integer value it has, the return will give the option number equivalent to the index.

  • nice :smiley: