|This page has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the Internet, as we can't guarantee the safety of other websites.|
|Glide () Secs to ()|
The Glide () Secs to () block is a Motion Block and a Stack Block that was introduced in Scratch 3.0. The block moves its sprite at a steady pace to the specified sprite or the mouse-pointer from a drop-down - this is similar to the sprite in a direction and repeatedly using Move () Steps, but with more precision. The first space is a number input, and the second space can set to a sprite, random position, and mouse-pointer. A downside to the block is that, while gliding, it pauses the script so that nothing else can happen during this time. A glide can only be interrupted by a stopping scripts block, and the If on Edge, Bounce block will fail to work its intended function while a sprite is gliding.
Making a Sprite glide to another sprite
when gf clicked glide (3) secs to [sprite2 v]::motion
Gliding to random positions to create pen lines
when gf clicked pen down set pen color to (pick random (0) to (360)) repeat (50) glide (3) secs to [random position v]::motion
Following a Sprite for a limited time before reaching it
when gf clicked glide (60) secs to [sprite2 v]::motion
The Glide () Secs to X: () Y: () block can be used to get the same effect:
when gf clicked glide (5) secs to x: ([x position v] of [Sprite2 v]) y: ([y position v] of [Sprite2 v])
when gf clicked forever glide (2) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180)) end
Move () Steps • Turn () Degrees • Go to () • Go to X: () Y: () • Glide () Secs to () • Glide () Secs to X: () Y: () • Point in Direction () • Point Towards ()• Change X by () • Set X to () • Change Y by () • Set Y to () • If on Edge, Bounce • Set Rotation Style () • X Position • Y Position • DirectionMore blocks...