|Set Drag Mode ()|
The Set Drag Mode () is a sensing block and a Stack Block. It sets the sprite to draggable or not draggable. Before Scratch 3.0, it was not possible to set the draggability of a sprite using a block. This block is not available for the Stage. Upon the release of Scratch 3.0, this became the only way to set sprite to draggable, due to removing the Draggable Sprite Feature.
The dropdown has two options: draggable and not draggable. These change the sprite's draggability. If a sprite is non-draggable, it is normal, and if it is draggable, it can be dragged without a shadow, even in the player and fullscreen options. It can be used to drag a sprite in a project without needing a script for dragging.
- After the start of the game is broadcasted, the sprite can be dragged.
when I receive [start game v] set drag mode [draggable v]
- The sprite can be dragged if the space key is pressed.
forever if <key [space v] pressed?> then set drag mode [draggable v] else set drag mode [not draggable v]