
Sorry about that. I've fixed it above for future viewers.
And here is some more code to expand on what Pincho Paxton said, and to see it in use.
SYNC ON
SYNC RATE 60
`Your program will now try to force a screen refresh rate of 60 times per second.
DIM speed(20) AS FLOAT
`Create an array that will store random speeds for our objects.
FOR i = 1 TO 20
MAKE OBJECT CUBE i, 10
POSITION OBJECT i, RND(100) - 50, RND(100) - 50, RND(100) - 50
speed(i) = (RND(10)/10.0) + 0.1
NEXT i
`FOR-NEXT loops are super handy. 'This command will define a program loop that will loop a finite number of times.'
`Above, we tell the loop to increase the variable 'i' by 1 (and up until 20) and create objects, assign their
`random positions, and store a random number to the 'speed()' array created earlier.
AUTOCAM OFF
`'automcam off' tells your program to not have the camera follow the object as it moves in 3d space.
POSITION CAMERA 0, 30, -200
POINT CAMERA 0, 0, 0
`Manually set the camera position and camera look position.
DO
IF keystate(16) = 1
ToStart = 0
ELSE
ToStart = 1
ENDIF
`Just set up an input command. Keystate(16) is the 'Q' key
IF ToStart = 0
FOR i = 1 TO 20
MOVE OBJECT DOWN i, speed(i)
NEXT
`Again, we use a FOR-NEXT loop to move the objects while inside your IF statement
`For you benefit, indent your nested code! It will be extremely useful for you.
ENDIF
SET CURSOR 0, 0: PRINT "Press 'Q' to make objects move."
SYNC
`Make sure to put the SYNC command outside any loops other than the main game (DO-LOOP) loop.
LOOP
END
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.