How to imitate dragging a sprite

Put this script in the sprite you want to drag:
and turn off draggable:

Only use this if you want to run code while the user is dragging the sprite.

if you put blocks after the script it only does it when the user drops the sprite (behaves like image )

can't you use

[scratchblocks] set [draggable v] to < a boolean :: operators> [/scratchblocks]

Yes, if you mean image
because the "my draggable?" variable interfears with my "dragging" script.

And this is so that you can

you can still do that, just set the draggable to true.

The script does not run while I am dragging the sprite with "my draggabe?" set to true.

[scratchblocks] set [draggable v] to < true :: operators >
do some stuff :: grey[/scratchblocks]

Try using image

  • With "my draggable?" set to true
  • With "my draggable?" set to false and the script image
    and try dragging the sprite

I don't get it.


it does not rotate or draw, but with

it does rotate and draw.

I see, the pen does not draw when the sprite is dragged.

This gave me a chuckle because of my long-ago Scratch project along the same lines.

In that project, the sprite goes directly the mouse pointer.

Wait, the second one does the same thing mine does. (exept you have to click the flag first)

Otherwise, cool!