(Redirected from User:Apple502j/Set Pen () to () (block))

Document stub.png This article is a stub. It may be incomplete, unfinished, or have missing parts/sections. If the article can be expanded, please do so! There may be suggestions on its talk page. (December 2017)
Set Pen () to ()
set pen [color v] to ()
Category Pen Extension
Type Stack
Introduced in 3.0

Set Pen () to () block is a pen extension block and a Stack block that is coming in Scratch 3.0. This block sets the pen's color, saturation, brightness (also known as shade), and transparency. The first value can be selected from "color" (default), "saturation", "brightness", and "transparency".

Examples

  • Use the color the user answered.
when flag clicked
ask (What color do you want to write?) and wait
set pen [color v] to (answer)
pen down
repeat (10)
 move (10) steps
 turn cw (91) degrees
end
  • Set a random color
set pen [color v] to (pick random (1) to (100))
set pen [saturation v] to (pick random (1) to (100))
set pen [brightness v] to (pick random (1) to (100))
set pen [transparency v] to (pick random (1) to (100))

See also