This code might come in handy for those who want to make a R.T.S.
This explains how to select an area and move a sprite to that position.
load bitmap "1r.bmp",1
get image 102,0,0,15,15
sprite 102,600,480,102
delete bitmap 1
backdrop on
color backdrop 0
hide mouse
x=600
y=480
do
sync on
sync rate 1000
circle mousex(),mousey(),5
dot mousex(),mousey()
ink rgb(255,10,0),1
line mousex()-15,mousey(),mousex()+15,mousey()
line mousex(),mousey()-15,mousex(),mousey()+15
circle wayx,wayy,10
set cursor sprite x(102),sprite y(102)+20
print "sprite x:- ",sprite x(102)
set cursor sprite x(102),sprite y(102)+35
print "sprite y:- ",sprite y(102)
if mouseclick()=1 then wayx=mousex() : wayy=mousey() : action=1
if action=1
if sprite x(102)<wayx then x=x+3 : sprite 102,x,y,102
if sprite x(102)>wayx then x=x-3 : sprite 102,x,y,102
if sprite y(102)<wayy then y=y+3 : sprite 102,x,y,102
if sprite y(102)>wayy then y=y-3 : sprite 102,x,y,102
endif
if sprite y(102)=wayy then if sprite x(102)=wayx then action=0
sync
loop