Discuss Scratch

LittleBigStinker
Scratcher
57 posts

Please help with layering

how do i make the upgrades show like this, and why is the options menu messed up? https://scratch.mit.edu/projects/947569163/

deck26
Scratcher
1000+ posts

Please help with layering

Not really clear what you want to happen compared with what you show. Do you realise every object (sprite or clone) has its own layer and the number of layers matches the total number of objects? So you can't have several sprites on the same layer, you need to order them or keep them separate so it doesn't matter.

The most common errors with layers are things like

- sending one sprite back 1000 layers and another back 500 and assuming the second will always be in front - if there are only 20 layers all this does is send each sprite to the back and which is actually at the back depends on the order in which the scripts run

- using forever loops and sending things to the front and then back 1/2/3 layers but, again, not controlling the order in which the scripts run.

- assuming a layer doesn't change. Sending a sprite to the front and back 10 layers doesn't mean that sprite is forever on layer 11 - every other layer change affecting a layer in front of that sprite will move it forward or back in layers.

Ranger_07
Scratcher
100+ posts

Please help with layering

I think if you insert this:
go to front
go back (22) layers
after the “show” block inside the forever loops of all sprites inside the ‘grandmas’, ‘fishermen’, ‘farms’ and ‘laser pointers’ folders, it should bring them into view, yet behind the “menu” sprite.
Do the same for the “Clicker Counter”, “Grandma Counter”, “Farm Counter”, “Fisherman Counter”, and “Laser Counter” sprites, but go back 30 layers instead.
Repeat for the “WR” sprite, but only go back 15 layers.
For the sliders:
On the grey select sprites add a “Go to front” block after the show in the forever loop
Do the same on the white bar sprites, but also add a “go backward (3) layers” block after it.

Hopefully this helps…
LittleBigStinker
Scratcher
57 posts

Please help with layering

Ranger_07 wrote:

I think if you insert this:
go to front
go back (22) layers
after the “show” block inside the forever loops of all sprites inside the ‘grandmas’, ‘fishermen’, ‘farms’ and ‘laser pointers’ folders, it should bring them into view, yet behind the “menu” sprite.
Do the same for the “Clicker Counter”, “Grandma Counter”, “Farm Counter”, “Fisherman Counter”, and “Laser Counter” sprites, but go back 30 layers instead.
Repeat for the “WR” sprite, but only go back 15 layers.
For the sliders:
On the grey select sprites add a “Go to front” block after the show in the forever loop
Do the same on the white bar sprites, but also add a “go backward (3) layers” block after it.

Hopefully this helps…
this doesnt work because they are all on different layers, i need some way to figure out how many layers there are
deck26
Scratcher
1000+ posts

Please help with layering

Are you sure you need to work that out though? Potentially you just need to control the layers for a few sprites which may be as simple as broadcasting to one sprite to go to the front and then again to get the others to do the same. But until you explain what exactluy is wrong with what you showed I can only guess what you're trying to achieve.

I often find it useful to create a separate project to resolve issues so other parts of the project don't get in the way. It would certainly be easier to help if we know we can ignore your other sprites.

Powered by DjangoBB