Revision as of 02:01, 22 June 2019 by Jonathan50 (talk | contribs) (Add {{Removed Blocks}}, remove redundant section, and make other very minor changes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
Go to Front
2.0 Go to Front.png
Category Looks
Type Stack
Removed in 3.0

The Go to Front block was a Looks block and a stack block. The block would place a sprite in front of all other sprites. It was replaced by go to [front v] layer in Scratch 3.0, because the new block could send a sprite both forward and backward.

Example Uses

As this block puts the sprite in front of others, it was widely used in setting up three-dimensional scenes, or placing objects in front of other objects. Some common uses were:

  • Putting an object closest to the viewer in a 3D animation
  • Making sure an object sprite is on a table sprite by putting the object in the front
  • Putting buttons in front of a toolbar
when I receive [show toolbar v] // In the toolbar sprite
go to front // So the toolbar is not behind anything
show
broadcast [tools v] // Now tell the tools to show.

when I receive [tools v] // In each tool sprite
go to front // So it is in front of the tool bar
show
  • Covering one sprite with another
  • Simply moving one object in front of another

This block was often used in conjunction with the Go Back () Layers block to move a sprite to a specific layer. For example, this script moved a sprite to the 6th layer from the front (which means there were 5 sprites on top of it):

go to front
go back (5) layers

Workaround

Main article: List of Block Workarounds

This block could be replicated with the following code:

go back ((0) - ((object count) + (1))) layers

The variable (object count) should be set to the number of objects (sprites, monitors, etc.) on the Stage.

See Also