This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. |
- This article is about the old block in Scratch 2.0. For the new block, see Go to () Layer (block).
Go to Front | |
go to front:: looks | |
Category | Looks |
Type | Stack |
Introduced in | 0.2 |
Removed in | 3.0 |
The go to front block was a Looks block and a stack block. The block would place a sprite in the frontmost layer, being in front of all other sprites. It was replaced by the go to () layer block in Scratch 3.0, because the new block could move sprites to both the frontmost layer and the backmost.
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:: looks // 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:: looks // 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 can be replicated with the block that replaced it:
go to [front v] layer
Note: | When a project with the block is uploaded into Scratch 3.0, it is replaced with this workaround. |
It can also be replaced with this workaround:
go [backwards v] ((-1)/(0)) layers
Note that the Go Back () Layers block is needed for this workaround to work in Scratch 2.0:
go back ((-1)/(0)) layers
See Also
For sprites |
Say () for () Seconds • Say () • Think () for () Seconds • Think () • Switch Costume to () • Next Costume • Switch Backdrop to () • Next Backdrop • Change Size by () • Set Size to ()% • Change () Effect by () • Set () Effect to () • Clear Graphic Effects • Show • Hide • Go to () Layer • Go () () Layers • Costume () • Backdrop () • Size
|
For the Stage |