i was trying to do some
simple movements with a sprite using the arrow keys. you know the classic "if you press up the picture moves up a little, if you press down..."
well, i couldn't even get that to work. here is what i have so far, but it just doesn't work.
cls
load image "C:\Dark Basic Lite\square.bmp",1
sprite 1,1,1,1
wait 2000
x=sprite x(1)
y=sprite y(1)
do
check()
if u=1
dec y,5
paste sprite 1,x,y
endif
if d=1
inc y,5
paste sprite 1,x,y
endif
if l=1
dec x,5
paste sprite 1,x,y
endif
if r=1
inc x,5
paste sprite 1,x,y
endif
loop
function check()
u=upkey()
d=downkey()
l=leftkey()
r=rightkey()
e=returnkey()
endfunction
thanks for any help