Posted: 26th Jul 2004 01:15
Thanks bibz1st got the idea and played around with a loop FOR/NEXT and got the effect I was after, however needed to put in the wait command to slow things down. Is there another way of slowing down the loop to make it run the same speed on different computers without using the wait command.
Rik
set display mode 1024, 768, 32
restore level1
cubesize = 50
for j = 1 to 15
for i = 1 to 15
read a
if a = 1
inc objectcounter
make object cube objectcounter, cubesize
position object objectcounter, j * cubesize, 0, i * cubesize
COLOR OBJECT objectcounter,objectcounter*100
endif
next i
next j
objectcounter=objectcounter+1
make object cube objectcounter,cubesize
position camera 250,200,-350
x=50:y=50:z=50
position object objectcounter,x,y,z
do
IF UPKEY()=1 and keypressed=0
keypressed=1
for stp=1 to cubesize
inc z
POSITION OBJECT objectcounter,X,Y,Z
wait 10
next stp
keypressed=0
ENDIF
loop
level1:
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1