USING THE LOOP INDEX
One of the most important things you need to understand when it comes to ‘For’ loops is the loop index.
Instead of setting these to random, I will set them up to simply loop.
I click ‘Toggle disabled’ so it doesn’t run the second ‘For’ loop.
I move these up.
Technically, it is adding the loop index. I multiply it by thirty-two. The number thirty-two is the width of the actual ‘Sprite’
Let’s see what happens.
It looks quite nice. Let’s say set the letter ‘Y’ at 50.
See what happens.
That’s how you set up the grid. If these grids need specific properties, you can do that too. If you want more space, you can do that.
But for now, keep it like this.
If we want to uncheck this.
I copy and paste these here and replace them with ‘Sprite’ too!
We run this and see what happens.
We have to do something with the letter ‘Y’
If we do both here, the result is the same.
As you can see, we are using it here.
That’s how you use a ‘For’ loop.