SandCastleIcon.png 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.

Clock.png This article or section contains information about a feature from a future version of Scratch that is unreleased and is subject to change. Please cite any additional info in order to prevent speculation.
Document stub.png This article is a stub. It may be incomplete, unfinished, or have missing parts/sections. If the article can be expanded, please do so! There may be suggestions on its talk page. (August 2017)
Glide () Secs to ()
3.0 Glide () Secs to ().PNG
Category Motion
Type Stack

The Glide () Secs to () block is a Motion Block and a Stack Block that will be included in Scratch 3.0.[1][2] 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.

Example uses

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])

See Also