Search code examples
colorsmit-scratch

Anyone know if its possible draw to erase the picture on the top?


Scratch allows selection of the color using the set pen color. Does anyone know if its possible to program to set the color to transparent so that what ever is drawn can effectively be erased? What would the color number be for that?

enter image description here

Update

The idea was to cover a picture (background) with a colour drawn over the top. Now give the player a little creature that erases the colour on top, they have a certain amount of moves or time to guess what the picture is. The less moves/time they use the more points the player will be awarded. But the problem seems to be that in the paint a sprite part of scratch erase is an option, but not in the pen programming.

If I cant solve it using erase apprach, my alternative is to make a lot of sprites covering the picture and hide them when the creature touches them. But it seems less fun for the player as the uncovered patterns will be more predictable.


Solution

  • Unfortunately, this isn't really possible. If you have a backdrop that's all one color, you could set the pen color to be the same as the backdrop and color over what you already have (giving the illusion of erasing), but other than that there really isn't a good way.

    Your only other option is to use the clear block and then re-draw everything except the piece you want to erase.

    If you want to give more context about your specific project, I might be able to help you work out a solution (I've done quite a lot with pen blocks over the years).