|Go Back () Layers|
The Go Back () Layers block is a Looks block and a Stack block. The block changes its sprite's layer value by the specified amount. This block is rather unusual compared to other blocks. It moves the layer value back, and not forward. To move it forward instead, a negative number can be used.
Moving Forward Layers
Sprites can also move forward layers using this block. If a negative value is entered into the block, the sprite will move forward the specified number of layers. For example,
go back (3) layers moves the sprite back 3 layers, but
go back (-3) layers moves the sprite forward 3 layers.
As this block changes its sprite's layer value, it is used whenever a sprite's layer value must be changed, whether forward or backward. Some common uses are:
- 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 is 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
go back (999) layers
This block cannot be practically replicated with other Scratch blocks, due to the fact that there is currently 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:
set layer to ((layer) - (amount)) // category=looks
A rather impractical approach is 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 will mess up any other layering in the project.
Say () for () Secs • Say () • Think () for () Secs • Think () • Show • Hide • Switch Costume to () • Next Costume • Switch Backdrop to () • Change () Effect by () • Set () Effect to () • Clear Graphic Effects • Change Size by () • Set Size to ()% • Go to Front • Go Back () Layers • Costume # • Backdrop Name • Size
|For the Stage|