thx to all of u
it makes sense now
but how do i continue from a loop?
btw if i use a loop iside a loop, the main loop will stop doing what it dos
sync rate 90
sync on
hide mouse
box 0,0,15,50
get image 1,0,0,15,50
get image 2,0,0,15,50
box 0,0,10,10
get image 3,0,0,10,10
cls
x1 = 600
x2 = 40
y1 = 240
y2 = 240
ball_posx = 320
ball_posy = 240
step# = 5
sprite 1,x1,y1,1
sprite 2,x2,y2,2
sprite 3,ball_posx,ball_posy,3
do
if upkey() = 1 and y1 > 0 then y1 = y1 - step#
if downkey() = 1 and y1 < 430 then y1 = y1 + step#
if shiftkey() = 1 and y2 > 0 then y2 = y2 - step#
if controlkey() = 1 and y2 < 430 then y2 = y2 + step#
sprite 1,x2,y1,1
sprite 2,x1,y2,2
sprite 3,ball_posx,ball_posy,3
do
move sprite 3,1
sync
loop
sync
loop
try it out, and now u cant move the 2 boxes
but if u remove the inside loop u can again move the boxes