Graphics3D 800,600,0,2 SetBuffer BackBuffer() camera=CreateCamera() CameraViewport camera,0,0,800,600 light=CreateLight() col=8 : row=11 : total_cube=col*row : num=0 : spacer_cube=4 : xoffset#=24.1 : yoffset#=17.7 total_hexa=9 : spacer_hexa#=2.5 Dim cube(total_cube) Dim hexa(total_hexa) plane=CreatePlane() MoveEntity plane,0,-3,30 RotateEntity plane,-90,0,0 EntityColor plane,0,50,255 x#=0 : y#=0 : depth=22 For columns = 1 To col For rows = 1 To row num=num+1 x#=rows*spacer_cube-xoffset# y#=columns*spacer_cube-yoffset# cube(num)=CreateCube() PositionEntity cube(num),x#,y#,depth EntityColor cube(num),0,120,255 Next Next x#=-4.7 : y#=0 : depth=8 : offset_hex=8 : alpha#=.9 : hexa_scale#=1.5 For hexs=1 To total_hexa hexa(hexs)=CreateCube() y#=hexs*spacer_hexa#-offset_hex PositionEntity hexa(hexs),x#,y#,depth RotateEntity hexa(hexs),0,hexs*(90/total_hexa),0 ScaleEntity hexa(hexs),hexa_scale#,1,hexa_scale# EntityColor hexa(hexs),100,100,255 EntityAlpha hexa(hexs),alpha# Next speed#=.03 While Not KeyHit(1) For reps=1 To total_cube TurnEntity cube(reps),.5,1.2,1.3 Next For reps=1 To total_hexa TurnEntity hexa(reps),0,1,0 MoveEntity hexa(reps),0,-speed#,0 If EntityY(hexa(reps)) <-10 Then PositionEntity hexa(reps),x#,12.5,depth Next RenderWorld Flip Wend End
Heres the code guys, thanks for the help!! :)
By the way I've not decided on colours yet :)))