Hi all !
Could someone please have a look at my code and tell me where I'm going wrong ?
hide mouse
sync on
sync rate 85
for i=1 to 11
ink rgb(255,0,0),0
box 0,0,50,50
ink -1,0
center text 25,15,str$(i)
get image i,0,0,50,50
next i
for i=1 to 10
sprite i,rnd(640),rnd(480),i
next i
do
cls 0
sx=1
sprite 11,x,y,11
sync
`if I change the i for a number between 1-10 it delete's the
`relevant image number, but how do I make it delete all boxes
`sprite 11 comes into contact with ?
if sprite exist(i)
if sprite collision(11,i) then delete sprite i
endif
if leftkey()=1 then x=x-sx
if rightkey()=1 then x=x+sx
if downkey()=1 then y=y+sx
if upkey()=1 then y=y-sx
loop
end