This lets it go at any angle, instead of just 0,45,90 etc:
Graphics 800,600,32,2 SetBuffer BackBuffer() Global Rx# = 10 Global Ry# = 10 Global goX#, goY# ;alter this to change movement speed Global speed#=2 Repeat Cls Mx% = MouseX() My% = MouseY() Rect Rx-50, Ry-50, 100, 100, 0 If MouseHit(2) Then goX = Mx goY = My EndIf dx#=(goX-rx) dy#=(goY-ry) l#=Sqr(dx*dx+dy*dy) If l>1 dx=dx/l dy=dy/l rx=rx+dx * speed# ry=ry+dy * speed# Else Text 400,300,"Target reached!",1,1 EndIf Oval goX-3,goY-3,6,6,0 Flip Until KeyHit(1) End