Moving one of 200 cubes?

Blitz3D Forums/Blitz3D Beginners Area/Moving one of 200 cubes?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

what's wrong with DIm arrays? I mean, searching for the cube that has index 7...somewhat inefficient.
Graphics3D 800,600
cam=CreateCamera()
PositionEntity cam,0,0,10
light=CreateLight()

dim cube(199)
For i=0 To 199
 cube=createcube()
 positionentity cube(i),10,0,i*5
Next

While Not KeyHit(1)
 turnentity cube(7),0,.1,0
 RenderWorld()
 Flip
Wend


so...

cube(7)

replaces:

c.cube = first cube
counter = 0
repeat
counter = counter + 1
c = after c
if c.cube = null then runtimeerror("Does not exist")
until counter = 7