How to generate a square of objects with a given side length

Ok, so I would like to have some code that generates objects in a square formation (just the edges of the square, nothing in the middle) with a variable side length so that I could change it from 2 grid spaces wide to 20 grid spaces wide if I wanted. Is there a simple way to do this? Is there an example that already exists for this (I looked and I wasn’t able to find one, but I may have missed something)?

1 Like

Repeater increasing the length by 32 pixels each time

1 Like

Like that, just adjust the values as needed. (You’ll need to add an input into the X)

1 Like

Thank you so much! This worked great! I was making it so much more complicated than it needed to be.

1 Like