Revision as of 00:43, 8 January 2019 by EIephant Lover (talk | contribs) (fixed sb)

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 Back () Layers
2.0 Go Back () Layers.png
Category Looks
Type Stack

The Go Back () Layers block was a Looks block and a Stack block. The block changed its sprite's layer value by the specified amount. This block was rather unusual compared to other blocks. It moves the layer value back, and not forward. In Scratch 3.0, it was replaced with go [forward v] () layers, because the new block could move a sprite forwards as well as backwards.

Moving Forward Layers

Sprites could also move forward layers using this block. If a negative value was entered into the block, the sprite would move forward the specified number of layers. For example, go back (3) layers moved the sprite back 3 layers, but go back (-3) layers moved the sprite forward 3 layers.

Example Uses

As this block changed its sprite's layer value, it was used whenever a sprite's layer value must be changed, whether forward or backward. Some common uses were:

  • Changing layer values in 3-dimensional scenes and animations
  • Making a sprite go behind another sprite
  • Stacking sprites on top of each other (from a bird's eye view)
  • Creating fancy 3-dimensional illusions

This block was often used in conjunction with the Go to Front block to move a sprite to a specific layer. For example,

go to front
go back (5) layers

moves a sprite to the 6th layer (5 + 1). To reverse,

go back (-5) layers

Backmost Layer

Scratchers were suggesting a "go to back" block since there was a Go to Front block.[1] This block, go to [ v] layer, was added in Scratch 3.0.

Workaround

This block could not be practically replicated with other Scratch blocks, due to the fact that there is no block that holds the layer value and no block that can set the layer value. However, if both blocks existed, the block could be replicated with the following code:

define go back (amount) layers
set layer to ((layer::looks) - (amount)) :: looks

A rather impractical approach wass to use the bring to front block with other sprites to simulate the moving back of a sprite. This should not be depended on because it could sometimes ruin any other layering in the project.

See Also

References

  1. https://scratch.mit.edu/discuss/topic/36305/