Glide () Secs to () (block)

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 info added in order to prevent speculation.
Document stub.png This article is a stub. It may be incomplete, unfinished, or have missing parts/sections. If you can help expand the article, please do! 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. 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

See Also


  • This page was last modified on 12 November 2017, at 09:23.