How do you get a sprite to recognize another sprite has been dropped on top of it, not just touching it? For example, on a game board where you have draggable pieces, and you dragged a piece onto something and left it there, instead of just brushing over it.
I've tried using the timer in conjunction with the touching block, but with no results.
Thanks.
Offline
Try
[blocks]
<if><<<touching[ SPRITE <and> <not> <mouse down?>>>
<end>
[/blocks]
Last edited by Mayhem (2008-02-07 16:34:07)
Offline
You mean a prite that "fits" onto another sprite while you are dragging?
Try this:
If ( (abs (x position)) - (abs (xposition of sprite1) ) < 5 and ( (abs (y position)) - (abs (yposition of sprite1) ) < 5
go to sprite1
Offline
Of course, my solution assumes that you need to hold the mouse down to move the piece.
Offline