Here something that will help:
Change:
make object box 1,3,0.5,1: color object 1,rgb(255,0,0):position object 1,-10,0,5
make object box 2,3,0.5,1: color object 2,rgb(255,0,0):position object 2,-5,0,5
make object box 3,3,0.5,1: color object 3,rgb(255,0,0):position object 3,0,0,5
make object box 4,3,0.5,1: color object 4,rgb(255,0,0):position object 4,10,0,5
make object box 5,3,0.5,1: color object 5,rgb(255,0,0):position object 5,5,0,5
make object box 6,3,0.5,1: color object 6,rgb(255,0,0):position object 6,-7,0,7
make object box 7,3,0.5,1: color object 7,rgb(255,0,0):position object 7,-3,0,7
make object box 8,3,0.5,1: color object 8,rgb(255,0,0):position object 8,3,0,7
make object box 9,3,0.5,1: color object 9,rgb(255,0,0):position object 9,7,0,7
For:
blockx=-12:blockz=6
for t = 21 to 35
blockx=blockx+4
if blockx=12 then blockx=-8:blockz=blockz-2
make object box t,3,0.5,1: color object t,rgb(255,0,0)
position object t,blockx,0,blockz
next t
What that's done is instead of coding everything out by hand, has used a
FOR....NEXT loop that means it will go through the code lots of times, making
t change each time. So where ever
t is inside the loop, it actually will be a number. Change the 35 to get different numbers of blocks.