Download

Instance an actor in every axis.

Just need to know how to instance an actor in every axis, like in a grid fashion. I have a blueprint set up right now but it only duplicates in one direction, I need it in all directions. I think I have to make an array but I’m not sure how to go about doing that. Any help would be greatly appreciated.

instance.JPG

An array would work if you don’t need it to rotate.

@Corweee

Do you want it to look like a cross or do you want to have instances all around a certain objects going outwards, like a tile generator?

With cross I mean this:

I might get to bed soon, so I made the two variations to not let you down.

Cross method:
2e7fa80fcce043128d43a6aed24f88b6.png

Variables used:

Distance = 50
MaxInstancesLoops = 20

Note: Make sure to click the “eye” icon on the variables to expose them to the scene you are working with. It makes it far easier to fine tune the parameters that way.

Grid method:

Part 1:
c8d35fb395c1d811da3d5a4d5071fee140b3fe9e.png

Part 2: (same graph). Note: The “Set Distance Row” from part 1 is connected to the “For loop” on part 2.
e1018710e1d46ca1433207b6cbdd639568eb40cf.png

Variables used:

Rows = 20
Columns = 20
DistanceRows = 50
DistanceColumn = 10
InstanceSwitcher = 0
Offset = 50

Note: Make sure to click the “eye” icon on the variables to expose them to the scene you are working with. It makes it far easier to fine tune the parameters that way.

Hope I could be of help :).

Okay, I think I’ve figured out what you’re trying to do. You need a nested for loop, to create your instances in two dimensions.

Blueprint:

Result:

Yup! Nested loop was exactly what I needed, my programming friend helped me earlier with it but this is great, thanks for the replies guys!

Also, there is a *2dGridExecutionMacro *node that does all that and more. As seen here:

The rest of the code is responsible for checker pattern and can be ignored.