in this code i wrote:
set display mode 150,113,16
sync on
sync rate 60
backdrop off
hide mouse
load image \"tileset.bmp\",1
for n=1 to 100
create animated sprite n,\"tileset.bmp\",2,1,1
next n
dim sprites(100)
data 1,1,1,1,1,1,1,1,1,1
data 1,2,2,2,2,2,2,2,2,1
data 1,2,1,1,1,1,1,1,2,1
data 1,2,1,1,2,1,2,2,2,1
data 1,2,1,1,2,1,1,1,1,1
data 1,2,1,1,2,1,1,1,1,1
data 1,2,1,1,2,1,1,1,1,1
data 1,2,2,2,2,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
for n=1 to 100
read z
sprites(n)=z
next n
do
`can you fix the position sprites loop to compress it to a much smaller size?
`position sprites
for n=1 to 100
if n<11 then sprite n,n*10-10,0,1
if n>10 and n <21 then sprite n,((n-10)*10)-10,10,1
if n>20 and n <31 then sprite n,((n-20)*10)-10,20,1
if n>30 and n <41 then sprite n,((n-30)*10)-10,30,1
if n>40 and n <51 then sprite n,((n-40)*10)-10,40,1
if n>50 and n <61 then sprite n,((n-50)*10)-10,50,1
if n>60 and n <71 then sprite n,((n-60)*10)-10,60,1
if n>70 and n <81 then sprite n,((n-70)*10)-10,70,1
if n>80 and n <91 then sprite n,((n-80)*10)-10,80,1
if n>90 and n <101 then sprite n,((n-90)*10)-10,90,1
next n
`end position loop
for n=1 to 100
play sprite n,sprites(n),sprites(n),1
next n
sync
loop
in this part:
if n<11 then sprite n,n*10-10,0,1
if n>10 and n <21 then sprite n,((n-10)*10)-10,10,1
if n>20 and n <31 then sprite n,((n-20)*10)-10,20,1
if n>30 and n <41 then sprite n,((n-30)*10)-10,30,1
if n>40 and n <51 then sprite n,((n-40)*10)-10,40,1
if n>50 and n <61 then sprite n,((n-50)*10)-10,50,1
if n>60 and n <71 then sprite n,((n-60)*10)-10,60,1
if n>70 and n <81 then sprite n,((n-70)*10)-10,70,1
if n>80 and n <91 then sprite n,((n-80)*10)-10,80,1
if n>90 and n <101 then sprite n,((n-90)*10)-10,90,1
is there any easier more \"formulatic\" way of doing this? things driving me insane. its ugly to look at. is there anyway i could do this in one line without just , Putting it all on one line so to speak...
Your signature has been erased by a mod - please limit your signature to 600x120