Discuss Scratch

HannahPenguin315
Scratcher
100+ posts

Umm...how do you make an eraser tool if you are making a drawing program?

I just can't figure out how? All I have so far for the script is “When this sprite clicked”. BTW by the time I read the answers, I may or may not have solved it already.
Psiborg
Scratcher
500+ posts

Umm...how do you make an eraser tool if you are making a drawing program?

Set the pen to the background colour?
ZozaTech
Scratcher
500+ posts

Umm...how do you make an eraser tool if you are making a drawing program?

First make a new sprite for the eraser
You also need a sprite for the pen(drawing)
Put this inside the eraser
when green flag clicked
forever

if <<touching [ mouse pointer] ?> and <<mouse down?> >> then
broadcast [ erase]

end

end

Okay. Now in the drawing sprite, put this

when I receive [ erase]
hide


There, done.
streamline1
Scratcher
79 posts

Umm...how do you make an eraser tool if you are making a drawing program?

Like Psiborg said, I would set the pen color to the background color. That way, it will cover anything the user wants to erase.
Letsgopitt
Scratcher
500+ posts

Umm...how do you make an eraser tool if you are making a drawing program?

You could have the the eraser switch to a white circle costume, and stamp while the mouse is down.
monstermash3
Scratcher
1000+ posts

Umm...how do you make an eraser tool if you are making a drawing program?

Set the pen color to white.
happyb123
Scratcher
12 posts

Umm...how do you make an eraser tool if you are making a drawing program?

when I receive [ERASER]
set pen color to [WHITE]
duckboycool
Scratcher
1000+ posts

Umm...how do you make an eraser tool if you are making a drawing program?

happyb123 wrote:

when I receive [ERASER]
set pen color to [WHITE]
This is a very old topic, please check the dates of topics before posting. Thank you.

Powered by DjangoBB