EDIT: oh you edited your post before i posted this.so you dont need this explanation anymore, but ill just keep it as is.
first check the data statements at the bottom:
there are 5 numbers in a data statement,and 5 data statements
that means 5 numbers in a row and 5 numbers in a column
`1 means theres object in position
`0 means theres no object in position
`this is the inverse of data which means it reads backwards
Data 1,1,1,1,1
Data 1,0,1,0,1
Data 1,1,0,1,1
Data 1,1,1,1,1
Data 1,1,1,1,1
Next check the first part of code:
z = 1 to 5 and x = 1 to 5
while z = 1, x = 1,2,3,4,5
while z = 2, x = 1,2,3,4,5 again and so on..
read objectexist,
objectexist is just a variable i made up it can be anything.the point is it reads a data number to this variable every increase of x and z in the for next loop
you see there are 1 and 0 in the data, so we check if variable objectexist is bigger than 0
objectexist > 0.
if so we increase another variable called a, which is going to be our object number. and accordingly we create a cube with the size 10.
then we position the object with the x and z variables which increase in the for next loop
when a = 1, z = 1 and x = 1
when a = 2, z = 1 and x = 2
when a = 3, z = 1 and x = 3 until 5...etc
when a = 8, z = 2 and x = 3 and so on.
soo if we multiply x with 50 there will be 50 unit difference between the last x and next x if you understand.
for z = 1 to 5
For x = 1 to 5
read objectexist
if objectexist > 0
inc a
Make Object Cube a, 10
position object a, x*50, 5, z*50 `50 is the scale value
endif
next x
next z