Instancing meshes in an array?

Hey all,

I followed THIS TUTORIAL (as far as I needed) to create instances on a flat plane. It gives me the ability to add 2 seperate instance meshes and have them randomly generate within the given parameters. The questions I have are:

  1. How would I make this into a 3D array instead of just a 2D plane?
  2. How would go about adding MORE types of instances? The way he shows only allows 2 with the use of a branch and a For Each Loop. I don’t really know scripting logic well, and I’m unsure how to add more instances to the tree.

Thanks in advance,

Sorry, I’m incredibly new to Blueprints. Could you explain a bit further how I could implement those into my node graph?

I understand what they are, just not sure how to use them.

  1. X = i % MaxX
    Y = floor (i / MaxX) % MaxY
    Z = i / (MaxX * MaxY)

    1. instead of “branch on ==” use “switch on int”

This is great, but I’m very new to Blueprint. Could you try to explain further how to integrate that? Also, I realized I’m only making a cubed grid, not any rectangular, and I got the graph to work only using MaxX.

This is what my graph looks like now to give me an X and a Y. How should I change what I have to work with what you suggest?

try this:

I tried this and got weird results. It just shifts each sequential one up in Z space to make a cascading effect.

if you have extra objects in the Z direction, it means you probably used Modulus when you should have used division, in the branch that calculates the Z component of the Vector.