#9 2011-03-16 16:01:30

YourLocalBlockLib
Scratcher
Registered: 2011-03-10
Posts: 100+

Re: ITopic: Welcome to your local block library!

Pen
/img/tinypic/2mi16w3.jpg

/img/dropbox/BlockLibDiv2.png

/img/weebly/6791196.gif
Shared by Jonathanpb
blockspec:

('pen size' #r #penSize)

no code needed

What it does:
Reports the current pen size.

/img/dropbox/BlockLibDiv2.png

/img/weebly/4709984.gif
Shared by zorket
blockspec:

('pen down?' #b #penDown)

no code needed

What it does:
Reports whether the pen for that sprite is down or not.

/img/dropbox/BlockLibDiv2.png

/img/weebly/8307257.gif
Shared by Jwosty
blockspec:

('pen shade' #r #penShade)

code:

penShade
    ^ penShade

What it does:
Reports the shade of the sprite's pen.
/img/dropbox/BlockLibDiv2.png

/img/weebly/1258931.gif

Shared by Jwosty
blockspec:

('pen color' #r #penHue)

code

penHue
    ^ penHue

What it does:
Reports the pen color.

/img/dropbox/BlockLibDiv2.png

/img/weebly/6018411.gif Shared by Hardmath123 and made with Scramble

Blockspec:

('switch the up/down value of the pen' #- #switchPenValue)

Code:

switchPenValue
"Made using Scramble by Hardmath123"
    | t1 |
    t1 _ self penDown.
    t1 ifTrue: [self putPenUp.].
    t1 ifFalse: [self putPenDown.].

What this block does:
If the pen is down, put it up, and if it is up, put it down.

/img/dropbox/BlockLibDiv2.png

/img/weebly/8945775.gif Shared by Hardmath123
Blockspec:

('Stamp me at x: %n y: %n ' #- #stampAt:stampAt:)

Code:

stampAt: i1 stampAt: i2
"Made with Scramble by Hardmath123"
| t2 t1 |

t1_ self xpos.
t2_ self ypos.
self gotoX: i1 y:i2.
self stampCostume.
self gotoX: t1 y:t2.

What this block sprites:
Stamps the sprite at the specified position.

/img/dropbox/BlockLibDiv2.png

^ Back to Scratch Blocks
^ Back to Contents
 

Last edited by YourLocalBlockLib (2011-07-20 14:59:23)


/img/dropbox/BlockLibraryTitle.png

Offline