m (linked)
(Add {{Removed Blocks}}, remove redundant section, and make other very minor changes)
 
Line 6: Line 6:
 
| category  = [[Looks Blocks|Looks]]
 
| category  = [[Looks Blocks|Looks]]
 
| type      = [[Stack Block|Stack]]
 
| type      = [[Stack Block|Stack]]
 +
| removed    = 3.0
 
}}
 
}}
The '''Go to Front''' [[Blocks|block]] was a [[Looks Block|Looks block]] and a [[Stack Block|Stack block]]. The block would place a [[sprite]] in front of all other sprites. It was replaced by [[Go to () Layer (block)|<sb>go to [front v] layer</sb>]] in [[Scratch 3.0]], because the new block could send a sprite both forward ''and'' backward.
+
The '''Go to Front''' [[Blocks|block]] was a [[Looks Block|Looks block]] and a [[Stack Block|stack block]]. The block would place a [[sprite]] in front of all other sprites. It was replaced by [[Go to () Layer (block)|<sb>go to [front v] layer</sb>]] in [[Scratch 3.0]], because the new block could send a sprite both forward ''and'' backward.
  
 
== Example Uses ==
 
== 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:
+
As this block puts the sprite in front of others, it was widely used in setting up [[Three-Dimensional Projects|three-dimensional]] scenes, or placing objects in front of other objects. Some common uses were:
  
* Putting an object closest to the viewer in 3 dimensional [[Animation Projects|animation]]
+
* Putting an object closest to the viewer in a 3D [[Animation Projects|animation]]
 
* Making sure an object sprite is on a table sprite by putting the object in the front
 
* Making sure an object sprite is on a table sprite by putting the object in the front
 
* Putting buttons in front of a toolbar
 
* Putting buttons in front of a toolbar
<scratchblocks>
+
 
when I receive [show toolbar v] //in the toolbar sprite
+
<scratchblocks version="2.0">
go to front //so the toolbar's menu is not behind anything
+
when I receive [show toolbar v] // In the toolbar sprite
 +
go to front // So the toolbar is not behind anything
 
show
 
show
broadcast [tools v] //now tell the tools to show
+
broadcast [tools v] // Now tell the tools to show.
  
when I receive [tools v] //in each tool sprite
+
when I receive [tools v] // In each tool sprite
go to front //so it is in front of the tool bar
+
go to front // So it is in front of the tool bar
 
show
 
show
 
</scratchblocks>
 
</scratchblocks>
 +
 
* Covering one sprite with another
 
* Covering one sprite with another
 
* Simply moving one object in front of another
 
* Simply moving one object in front of another
  
This block was often used in conjunction with the [[Go Back () Layers (block)|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):
+
This block was often used in conjunction with the [[Go Back () Layers (block)|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):
<scratchblocks>
+
 
 +
<scratchblocks version="2.0">
 
go to front
 
go to front
 
go back (5) layers
 
go back (5) layers
Line 37: Line 41:
 
{{main|List of Block Workarounds}}
 
{{main|List of Block Workarounds}}
 
This block could be replicated with the following code:
 
This block could be replicated with the following code:
<scratchblocks>go back ((-1) * ((object count) + (1))) layers</scratchblocks>
 
The [[variable]] "object count" should be set to the number of objects ([[sprite]]s, [[Stage Monitor]]s, etc.) on the [[Stage]].
 
  
It could also be replaced by using the {{b|Go Back () Layers}} block with a negative number inside.
+
<scratchblocks version="2.0">go back ((0) - ((object count) + (1))) layers</scratchblocks>
  
== Replacement ==
+
The [[variable]] <sb version="2.0">(object count)</sb> should be set to the number of objects ([[sprite]]s, [[Stage Monitor|monitors]], etc.) on the [[Stage]].
In [[Scratch 3.0]], this block was replaced by [[Go to () Layer (block)|<sb>go to [ v] layer</sb>]] for also being able to send a sprite to the very back. The [[Go Back () Layers (block)|Go Back () Layers]] block was also replaced.
 
  
 
== See Also ==
 
== See Also ==
Line 50: Line 51:
  
 
{{Looks Blocks}}
 
{{Looks Blocks}}
 +
{{Removed Blocks}}
  
 
[[Category:Looks Blocks]]
 
[[Category:Looks Blocks]]
 
[[de:Komme nach vorn (Block)]][[ja:前に出す (ブロック)]]
 
[[de:Komme nach vorn (Block)]][[ja:前に出す (ブロック)]]

Latest revision as of 02:01, 22 June 2019

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