Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » Change Order of Sprites
- hectorsouthern
-
1 post
Change Order of Sprites
Hi,
How do I arrange sprites and choose what layer they are on? My sprites keep going behind things and I can't see them.
How do I arrange sprites and choose what layer they are on? My sprites keep going behind things and I can't see them.
- AonymousProfessor
-
100+ posts
Change Order of Sprites
You can use the “go to front” blocks and “go back (x) layers” blocks.
For example, if you want a sprite to be in front of everything,
And if you want to make sure a sprite is always in the back, you can use:
For example, if you want a sprite to be in front of everything,
when gf clicked //In sprite that goes in frontto make sure that the sprite is in the front.
go to front
when gf clicked //In all other sprites
go to front
go back (1) layers
And if you want to make sure a sprite is always in the back, you can use:
when gf clicked
go to front
forever
go back (999) layers
end
- 1234abcdcba4321
-
1000+ posts
Change Order of Sprites
For the always in the back…
99 layers is usually enough to push it to the back, if not, add another 9.
when green flag clicked
go back (99) layers
99 layers is usually enough to push it to the back, if not, add another 9.
Last edited by 1234abcdcba4321 (Jan. 4, 2014 21:27:45)
- LeedleMaster
-
55 posts
Change Order of Sprites
this should do:
when green flag clicked
go back (999999999999999999999999999999) layers
- amateurradiogeek15
-
1000+ posts
Change Order of Sprites
when green flag clicked
go to front
That's the way I'd do it…at least for the front part.

when green flag clickedTo go back.
go back (however many) layers

- GrandK_learning
-
1 post
Change Order of Sprites
If sprite1 is at the back, then sprite2, then sprite 3 and then sprite4 at the front
In the script for sprite 1
For each sprite from 2 to 4 add the following script using the correct sprite name
In the script for sprite 1
when green flag clicked
go to front
show
broadcast [layer sprite2 v] and wait
broadcast [layer sprite3 v] and wait
broadcast [layer sprite4 v]
For each sprite from 2 to 4 add the following script using the correct sprite name
when I receive [layer sprite2 v]
show
go to front
- Peaceful8
-
100+ posts
Change Order of Sprites
To set the layer of a sprite to make sure it overlaps the ones you want, but underlaps others do this:
when Lower Sprite's Green Flag clicked ::hat ::color events // Make sure this is ordered correctly. Sets a sprite at the second layer. (or the go back number - 1 layer.)
forever ::color events
go to front ::color events
go back (1) layers ::color events
end
when Upper Sprite's Green Flag clicked ::hat ::color events // Sets it at the front layer.
forever ::color events
go to front ::color events
end ::color events
- Discussion Forums
- » Questions about Scratch
-
» Change Order of Sprites