Why don't you make youself a function to create the exact cube you want? If you are doing repetative things, its often better to make a function for it. Personally, I code with a lot of functions. It helps keep your main loop really low in lines of code, and simple to read, and the nice thing is that once you have created your function and are happy with it, you can hide it away in an include file, or at the bottom of your page, so you don't have to look at it and get confused everytime you read the source. Here is a function to make the cube that you want:
Then you can make your cubes such as
Etc.
I would personally do this with a type as well. But I don't want to confuse you too much :)
Edit:
So the automate the y position of it, using the function from above, and using an array for storage:
This is the bit where types are really nice. If your intrested I can post up an example using types for storage.
Function CreateMyCube%(PosX#,PosY#,PosZ#,Scale#=2,ColorR%=100,ColorG%=100,ColorB%=100) ;Local Variables ---------- Local Cube% ;Holds Cube Handle ;========================== ;Create And Transform the Cube Cube = CreateCube() PositionEntity(Cube,PosX#,PosY#,PosZ#) ScaleEntity(Cube,Scale,Scale,Scale) EntityColor(Cube,ColorR,ColorG,ColorB) ;Return The Cube ID Return Cube End Function
Then you can make your cubes such as
;Standard Cubes c1 = CreateMyCube(-65,20,-10) c2 = CreateMyCube(-65,15,-10) ;Bigger Cube c3 = CreateMyCube(-65,10,-10,3) ;Smaller Cube c4 = CreateMyCube(-65,5,-10,0.5) ;Random Color c5 = CreateMyCube(-65,0,-10,2,Rnd(1,255),Rnd(1,255),Rnd(1,255))
Etc.
I would personally do this with a type as well. But I don't want to confuse you too much :)
Edit:
So the automate the y position of it, using the function from above, and using an array for storage:
CubeNumber%=0 Dim Cubes(20) For i = 20 to -15 Step 5 CubeNumber = CubeNumber + 1 Cubes(CubeNumber) = CreateMyCube(-65,i,-10) Next
This is the bit where types are really nice. If your intrested I can post up an example using types for storage.