Load Image "man.png",1
Sprite 1,400,200,1
offset sprite 1,25,25
size = 50000
Dim oldx(size)
Dim oldy(size)
Dim oldrot(size)
namb = 0
numb = 0
x = 400
y = 200
do
if mouseclick()=2
if numb > 0
sprite 1,oldx(numb),oldy(numb),1
rotate sprite 1,oldrot(numb)
dec numb
namb = numb
endif
else
if mouseclick()
if sprite x(1)<>mousex() and sprite y(1)<>mousey()
pointsprite(1,mousex(),mousey())
move sprite 1,0.04
endif
endif
//Sprite 1,sprite x(1),sprite y(1),1
Text 0,0,"Made by Kamac @ basic4ppc.com"
oldx(namb) = sprite x(1)
oldy(namb) = sprite y(1)
oldrot(namb) = sprite angle(1)
inc namb
if namb > size then namb = 0
numb = namb
endif
loop
function pointsprite(s,x,y)
dx = sprite x(s) - x
dy = sprite y(s) - y
ang# = wrapvalue(atanfull(dx,dy)*-1)
rotate sprite s,ang#
endfunction