What are you asking? Is the sprite following your mouse and you want to stop it from going through a sprite (or color)?
Offline
Try the script below. It won't be instantaneous (in fact, it will be rather slow), but if you want it sped up I can rewrite it to make it faster (using single frame)
when gf clicked go to x:(0) y:(0) forever if<([abs v] of ((mouse x)-(x position))) > (4)> if<((mouse x)-(x position)) > (0)> change x by (4) if<touching color [#000000]?> change x by (-4) end else change x by (-4) if<touching color [#000000]?> change x by (4) end end end if<([abs v] of ((mouse y)-(y position))) > (4)> if<((mouse y)-(y position)) > (0)> change y by (4) if<touching color [#000000]?> change y by (-4) end else change y by (-4) if<touching color [#000000]?> change y by (4) end end end
Offline