Go to () Layer | |
go to [front v] layer | |
Category | Looks |
Type | Stack |
Introduced in | 3.0 |
The Go to () Layer block is a Looks block and a stack block. The block makes a sprite go to the very backmost or frontmost layer. A sprite at the backmost layer will be covered by any sprites in front of it; a sprite at the frontmost layer cannot be covered by another sprite.
History
Before Scratch 3.0, there were only the Go to Front and Go Back () Layers blocks; no block existed to go to the back. Instead one could use the Go Back () Layers block with a large number for the input.
Example Uses
The dropdown input has two options: front and back. This block is useful in a wide variety of situations. Some common uses are:
- Starting a racing game where the finish line is painted below the cars
when backdrop switches to [track1 v] go to x: (-50) y: (-100) point in direction (90) go to [back v] layer
- Keeping a sprite visible during a drag-and-drop
when this sprite clicked repeat until <not <mouse down?>> go to (mouse-pointer v) go to [front v] layer end
- Making a thumbnail appear when the project is stopped
when gf clicked set [ghost v] effect to (100) forever go to [front v] layer end
In some cases, a sprite needs to move forward or backward, but not to the very front or back. The go [ v] () layers
block does that.
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 |