scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.45k stars 3.55k forks source link

Can a stamp (or draw pen) block above sprites be added to scratch? #5769

Open TheAwesome98-Real opened 4 years ago

TheAwesome98-Real commented 4 years ago

Expected Behavior

stamp draws over sprites (reproduced using clone)

expected

Actual Behavior

stamp draws under sprites (although that's intended behaviour)

actual

Steps to Reproduce

Position a sprite over another sprite (preferably at the edge, half in, half out), and run stamp on the sprite. The stamp should appear on the backdrop, and not over the sprite. If it is over the sprite, you have done it wrong, or this has been implemented (therefore you have used the wrong block).

Operating System and Browser

Chromium 73.0.3683.75 (Developer Build) built on Debian 9.8, running on Linux Lizard v1.0a (32-bit)

Explosion-Scratch commented 4 years ago

So are you suggesting a "stamp on top" block?

BoomerScratch commented 4 years ago

If you first stamp the sprite that you want in the back layer and then stamp the sprite you want in the front layer, it should work.

Explosion-Scratch commented 4 years ago

@BoomerScratch I think they mean stamping in front of an actual sprite, not another pen layer. Although this could be a workaround in some cases, if you need a moving or animated sprite and are doing other things with the pen this can be hard.

TheAwesome98-Real commented 4 years ago

So are you suggesting a "stamp on top" block?

yes, that is what i meant

Although this could be a workaround in some cases, if you need a moving or animated sprite and are doing other things with the pen this can be hard.

(I have used clone for now, i may need to think of creative ways to deal with the limit) yeah, the two background sprites are parallax scrollers, but the stamps don't scroll. i will need to use clone for now, but if this is added, i will use it.

BoomerScratch commented 4 years ago

yeah, the two background sprites are parallax scrollers, but the stamps don't scroll. i will need to use clone for now, but if this is added, i will use it.

You can send a broadcast to the parallax scrollers to stamp first and then send one to stamp the front layer, like this: image

Explosion-Scratch commented 4 years ago

@BoomerScratch Thanks! That makes sense

TheAwesome98-Real commented 4 years ago

yeah, the two background sprites are parallax scrollers, but the stamps don't scroll. i will need to use clone for now, but if this is added, i will use it.

You can send a broadcast to the parallax scrollers to stamp first and then send one to stamp the front layer, like this: image

that's a cool workaround idea, thanks! I'll try that. EDIT: I tried this:

whenFlagClicked {
    forever {
        pen.eraseAll();
        broadcast("background-stamp");
        broadcast("middleground-stamp");   
        renderLevelPart("0-0-1-1"); // this is a custom function, that calls renderBlockAt(type, xpos, ypos); a bunch of times, that just switches costume, goes to x and y, and stamps. but the ground does not appear over the parallax scrollers. what have I done wrong?
    }
}