Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Transparent Pen
- littlebunny06
-
Scratcher
100+ posts
Transparent Pen
So I ran this piece of code:

There is a place that is slightly more shaded than normal. Are there any workarounds for this?
set pen color to R: (255) B: (255) G: (255) Transparency: (200)But it makes this:
go to x: (20) y: (120)
pen down
go to x: (160) y: (120)

There is a place that is slightly more shaded than normal. Are there any workarounds for this?
- _nix
-
Scratcher
1000+ posts
Transparent Pen
The problem is that Scratch draws a dot when you use the “pen down” block - for example, try taking away that “go to x: 160 y: 120” block, and you'll see a transparent circle at the same spot as in that screenshot.
The solution is to first make the pen completely transparent, then set the pen down, and then set the transparency to the real value you want (like 200) and use your “go to” block. Something like this:
The solution is to first make the pen completely transparent, then set the pen down, and then set the transparency to the real value you want (like 200) and use your “go to” block. Something like this:
set pen color to R: (255) B: (255) G: (255) Transparency: (255) // or 0, depending on the script you use
go to x: (20) y: (120)
pen down
set pen color to R: (255) B: (255) G: (255) Transparency: (200) // the real transparency you want to draw with
go to x: (160) y: (120)
- littlebunny06
-
Scratcher
100+ posts
Transparent Pen
The problem is that Scratch draws a dot when you use the “pen down” block - for example, try taking away that “go to x: 160 y: 120” block, and you'll see a transparent circle at the same spot as in that screenshot.Ok. That worked really well
The solution is to first make the pen completely transparent, then set the pen down, and then set the transparency to the real value you want (like 200) and use your “go to” block. Something like this:set pen color to R: (255) B: (255) G: (255) Transparency: (255) // or 0, depending on the script you use
go to x: (20) y: (120)
pen down
set pen color to R: (255) B: (255) G: (255) Transparency: (200) // the real transparency you want to draw with
go to x: (160) y: (120)
Thanks- _nix
-
Scratcher
1000+ posts
Transparent Pen
No problemThe solution is to first make the pen completely transparent, then set the pen down, and then set the transparency to the real value you want (like 200) and use your “go to” block.Ok. That worked really wellThanks

You can also make the pen really really small - using “set pen size to 0”, or something like that - but it'll actually still draw an itty bitty dot. Making the pen totally transparent makes it so you can get exactly what you want.
Edit: bbcode fix
Last edited by _nix (June 2, 2018 17:36:54)
- Discussion Forums
- » Help with Scripts
-
» Transparent Pen