This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#501 2010-11-20 02:21:34

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

Sorry I missed those Hardmath23, I will add the variable maker and the boolean to reporter block, but I'm afraid your string to boolean isn't going to work with that code. To make that block you'd need the code

booleanstring: t1
^ t1 = 'true'

as by definition, booleans can only report true or false.

It worked for me...


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#502 2010-11-20 02:26:15

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Welcome to the OLD local block library!

Hardmath123 wrote:

Code:

('costume center' #r #rotationCenter)

reports costume center

You missed this, too!


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#503 2010-11-20 04:53:42

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Welcome to the OLD local block library!

And another:

Code:

('%n ^ %n' #r #x:expy: 2 2)

Code:

x: t1 expy: t2 
    ^ t1 raisedTo: t2

Reports x^y!


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#504 2010-11-20 05:09:14

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Welcome to the OLD local block library!

I really like the update image

http://img528.imageshack.us/img528/4416/66858359.gif

Last edited by Hardmath123 (2010-11-20 05:09:30)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#505 2010-11-20 10:19:32

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Welcome to the OLD local block library!

Hardmath123 wrote:

I really like the update image

http://img528.imageshack.us/img528/4416/66858359.gif

Yeah, me too


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#506 2010-11-20 15:35:43

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Welcome to the OLD local block library!

Great.
Guinea_Pig_Girl's block (found here, which you need to add BTW) gives me this error when I click OK on the block editor:
http://i51.tinypic.com/dynd3n.png
When I click OK on the message, the blocks in the editor disappear (besides the hat).
Help!

Last edited by meowmeow55 (2010-11-20 15:37:04)


Yawn.

Offline

 

#507 2010-11-21 14:56:21

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Welcome to the OLD local block library!

Bump!


Yawn.

Offline

 

#508 2010-11-21 16:03:13

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: Welcome to the OLD local block library!

meowmeow55 wrote:

Great.
Guinea_Pig_Girl's block (found here, which you need to add BTW) gives me this error when I click OK on the block editor:
http://i51.tinypic.com/dynd3n.png
When I click OK on the message, the blocks in the editor disappear (besides the hat).
Help!

The block worked for me.  hmm


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#509 2010-11-21 17:07:41

SSBBM
Scratcher
Registered: 2009-10-09
Posts: 100+

Re: Welcome to the OLD local block library!

I noticed you didn't add a few things I posted a wile back...

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

make line from x: () y: () to x: () y: () UPDATED
http://img3.imageshack.us/img3/8004/makelinescripts.gif

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

A BYOB category
http://img100.imageshack.us/img100/3091/listother.gifOther and List

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

New block (goes in the category ^)

http://img23.imageshack.us/img23/93/errorhm.gif

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

Tested: http://www.weebly.com/uploads/4/0/7/6/4076678/1711332.gif

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

And some new graphics stuff: http://img29.imageshack.us/img29/2083/bls.gif

Last edited by SSBBM (2010-11-21 17:08:17)


http://goo.gl/zVfAp http://goo.gl/laci8

Offline

 

#510 2010-11-21 18:39:54

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Welcome to the OLD local block library!

SSBBM wrote:

meowmeow55 wrote:

Great.
Guinea_Pig_Girl's block (found here, which you need to add BTW) gives me this error when I click OK on the block editor:
http://i51.tinypic.com/dynd3n.png
When I click OK on the message, the blocks in the editor disappear (besides the hat).
Help!

The block worked for me.  hmm

Must be something I messed with then. I don't think I made any changes that would affect this, but whatever. So, can you or someone else download the BYOB Block Library project, put in the code in the block, and upload it to Mediafire or somewhere? I'll upload it back to my site then.


Yawn.

Offline

 

#511 2010-11-22 20:19:10

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

chippo wrote:

you know, I think that in the next scratch there should be only one hat block, which would be: _________
             /              \___________
            | When <  >___________|
                 \_/

and then all the other hat blocks would be condensed into Boolean.

for example, to use [blocks]<when green flag clicked>[/blocks]
you would put a <Green Flag Clicked?> Boolean into the only hat block.

I am trying to but one thing is hat blocks are hard to decode. For now you could do when flag clicked forever wait until (boolean)

I have found where the Hat block functions are and it looks like it was a block already made which is like a Obsolete Hat Block:

Code:

t3 = WhenHatBlockMorph
        ifTrue: [(t1 at: 2)
                ~= false
                ifTrue: 
                    [t6 _ self blockFromTuple: (t1 at: 2)
                                receiver: t2.
                    t4 replaceArgMorph: t4 argMorph by: t6]].
    ^ t4

How to Find it: Go to Scratch Objects- then Scriptablescratchmorph- then the button instance- then blocks- then hatBlockFromTuple:receiver:.

http://scratch.mit.edu/static/projects/Pecola1/1434684_sm.png http://scratch.mit.edu/static/projects/ … 684_sm.png

Last edited by Pecola1 (2010-11-22 21:29:54)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#512 2010-11-22 20:33:25

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

Operators
http://i56.tinypic.com/261km15.jpg
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 519161.gif Shared by Zorket.
Blockspec:

('report %s' #r #report: 'hello')

Code:

report: t1
^ t1

What it does:
Reports it's contents. Useful for putting text in areas where it normally can't go. (such as the [go to $Sprites$] block.http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 264827.gif Shared by Zorket, optimised by nXIII
Blockspec:

('if %b then %s else %s' #r #if:then:else:)

Code:

if: t1 then: t2 else: t3
t1 ifTrue: [^ t2].
^ t3

What it does:
reports the first string argument if the boolean is true, the second if it's false.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 344397.gif Shared by Zorket
Blockspec

'if %b then %b else %b' #b #if:then:else:

Code:

if: t1 then: t2 else: t3
t1 ifTrue: [^ t2].
^ t3

What it does
reports the truth of the first or second boolean argument depending on the truth of the first.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 652253.gif Shared by Zorket
Blockspec

'true' #b #reportTrue

Code:

reportTrue
^ true

What it does
reports true
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://i53.tinypic.com/5bqjxh.jpghttp://www.weebly.com/uploads/4/0/7/6/4 … 743959.gif Shared by Zorket
Blockspec

'false' #b #reportFalse

Code:

reportFalse
^ false

What it does
reports false
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://i53.tinypic.com/5bqjxh.jpghttp://img229.imageshack.us/img229/1623/48031569.gif Shared by Zorket
Blockspec

('%T %s' #r #do:to:)

Code:

do: t1 to: t2
t1 = 'reverse' ifTrue: [^ t2 reversed].
t1 = 'shuffle' ifTrue: [^ t2 shuffled].
t1 = 'uppercase' ifTrue: [^ t2 asUppercase].
t1 = 'lowercase' ifTrue: [^ t2 asLowercase].
t1 = 'report' ifTrue: [^ t2].

Scratch blocks> commandBlockMorph> all> uncoloredArgMorphFor: add a strip:

Code:

$T = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #mixingNames;
choice: 'reverse'].

Scratch objects> scriptableScratchMorph> LOW then press class> otherOps:

Code:

mixingNames
    ^ #('lowercase' 'uppercase' 'reverse' 'shuffle' 'report' )

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://img258.imageshack.us/img258/2512/92187613.gif Shared by Hardmath123.
Blockspec:

('%b' #r #booleanstring:)

Code:

booleanstring: t1
    ^ t1

What it does:
Allows you to drop booleans into reporter spaces!
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png

^ Back to Scratch Blocks
^ Back to Contents

okay. so here is a new block I made which you did not add. here it is


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#513 2010-11-24 04:08:05

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Welcome to the OLD local block library!

I have a block request!
A boolean looks block that is like this:
(Saying:(type text here))
I know the code but I do not know how to program it


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#514 2010-11-24 08:55:13

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

zorket wrote:

sparks wrote:

sounds good Zorket  smile  You're already top scratch block contributor!

here's a challange for you, can you make any of these?

[clear line (n) or file [s]]

[write [s] to line (n) in file [s]]

wink

Oh, you got me. But I'm gonna be working on blocks like [if touching [sprite], delete self]

I see you are a block maker... http://scratch.mit.edu/static/projects/Pecola1/1434684_sm.png is a block that was made by scratch but they didn't finish it. All you have to do is make a block and the blocks name (under block specs) has #W at the end instead of #b or #l or any of the others (there are about 10 or 20).


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#515 2010-11-24 08:57:48

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

zorket wrote:

sparks wrote:

sounds good Zorket  smile  You're already top scratch block contributor!

here's a challange for you, can you make any of these?

[clear line (n) or file [s]]

[write [s] to line (n) in file [s]]

wink

Oh, you got me. But I'm gonna be working on blocks like [if touching [sprite], delete self]

I see you are a block maker... http://scratch.mit.edu/static/projects/ … 684_sm.png is a block that was made by scratch but they didn't finish it. All you have to do is make a block and the blocks name (under block specs) has #W at the end instead of #b or #l or any of the others (there are about 10 or 20).

I am quoting myself for no reason.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#516 2010-11-24 17:04:18

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Welcome to the OLD local block library!

.                              http://img528.imageshack.us/img528/4416/66858359.gif

Scratch blocks added: [2]
(costume centre) Shared by Hardmath123
((n)^(n)) Shared by Hardmath123


BYOB blocks added: [2]
[glide (n) secs to sprite [s]] Shared by Guinea_Pig_Girl
[make line from x:(n)y:(n) to x:(n)y:(n)] (updated) Shared by SSBBM


Block requests
<saying [s]?>


Other Updates:

♦ Fixed image for Johnnydean1's (ask in dialog [s]) block

♦Home post updated

♦Plea from meowmeow55, read it here and help if you can!

♦What should I do about this block post? does it go as a block submission if it already exists?

♦Total blocks shared in the library has hit 113! That's more than I ever imagined! Thanks for everyone's contributions! You can, of course, see all the contributors in the statistics post.

@Pecola: Please post the code for the ascii block(s) you linked me to rather than linking to a project, my java player is broken, thanks :)


________________________________________________________________________________
^home
^updates archive

Last edited by sparks (2010-11-24 17:16:10)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#517 2010-11-25 04:13:15

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Welcome to the OLD local block library!

Yay, 2nd place in contributors with 4, second only to Zorket!


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#518 2010-11-25 08:32:38

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Welcome to the OLD local block library!

Ta-Da!

Code:

getconstant: t1 
    t1 = 'pi' ifTrue: [^ '3.141592653'].
    t1 = 'phi' ifTrue: [^ '1.61803399'].
    t1 = 'e' ifTrue: [^ '2.71828183'].
    t1 = 'sqrt 2' ifTrue: [^ '1.41421356'].
    ^ 3.141592653

Code:

('%T' #r #getconstant:)

Scratch-Objects»ScriptableScratchMorph»sensing


Code:

constants
    ^ #('pi' 'phi' 'e' 'sqrt 2' )

Scratch-Blocks»CommandBlockMorph»-- all --»uncoloredArgMorphFor:

REPLACE ALL WITH

Code:

uncoloredArgMorphFor: t1 
    | t2 |
    t2 _ t1 at: 2.
    $a = t2 ifTrue: [^ AttributeArgMorph new choice: 'volume'].
    $b = t2 ifTrue: [^ BooleanArgMorph new].
    $c = t2 ifTrue: [^ ColorArgMorph new showPalette: true].
    $C = t2 ifTrue: [^ ColorArgMorph new showPalette: false].
    $d = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '0';
         menuSelector: #directionMenu].
    $D = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '48';
         menuSelector: #midiDrumMenu].
    $e = t2 ifTrue: [^ EventTitleMorph new].
    $f = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #mathFunctionNames;
         choice: 'sqrt'].
    $g = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #graphicEffectNames;
         choice: 'color'].
    $H = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupSensorNames].
    $h = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupBooleanSensorNames].
    $I = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1';
         menuSelector: #midiInstrumentMenu].
    $i = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1';
         menuSelector: #listIndexMenu].
    $k = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #keyNames;
         choice: 'space'].
    $L = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #listVarMenu].
    $l = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #costumeNames;
         choice: 'costume1'].
    $m = t2 ifTrue: [^ SpriteArgMorph new].
    $M = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorNames].
    $n = t2 ifTrue: [^ ExpressionArgMorph new numExpression: '10'].
    $N = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '60';
         menuSelector: #noteSelector].
    $s = t2 ifTrue: [^ ExpressionArgMorph new stringExpression: ''].
    $S = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #soundNames;
         choice: 'pop'].
    $v = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #varNamesMenu;
         choice: ''].
    $W = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorDirection].
    $x = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #sceneNames;
         choice: ''].
    $y = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1';
         menuSelector: #listIndexForDeleteMenu].
    $T = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #constants;
         choice: 'pi'].
    ^ ExpressionArgMorph new numExpression: '10'

Gives out the selected constants. Note the better arrows '»'

Meant to replace the pi block Zorket and I gave.

Officially my best block yet.

If you want to add a constant, just tell me.

Last edited by Hardmath123 (2010-11-25 08:43:35)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#519 2010-11-25 14:17:27

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

♦[/color]@Pecola: Please post the code for the ascii block(s) you linked me to rather than linking to a project, my java player is broken, thanks  smile


________________________________________________________________________________
^home
^updates archive

Sorry! I didn't think about that.
here is the code for blockspecs:

Code:

('ascii code of %s' #r #asciicodeof:) ('ascii %n as letter' #r #asciiLetter:)

Here is one of the codes for otherops:

Code:

asciiLetter: anInteger 
    | code |
    code _ anInteger asNumberNoError.
    ^ String with: (Character value: code)

and here is the other code for otherops:

Code:

asciicodeof: aString 
    | str |
    str _ aString asMacRoman.
    str size = 1 ifFalse: [^ 0].
    ^ str first asciiValue

What it does: The (ascii code of [ ]) can actually help a lot more than expected! You can put: <<(ascii code of [A]) > [64]> and <(ascii code of [A]) < [91]>> it will be able to tell if the letter is capital or not! Also by saying: if <(ascii code of [Answer]) > < (96)) then set variable to (ascii code of [Answer]) and change answer by -32. set variable to ((variable) as letter). It will turn a lowercase letter to a capital!

BTW can I add you to my friends? Thanks!

Last edited by Pecola1 (2010-11-25 14:24:52)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#520 2010-11-25 14:24:05

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Welcome to the OLD local block library!

I love the way that a) you think you have to ask me if you can add me as a friend, and b) that you thank me before I answer  tongue  Of course, you're welcome to add me, it just makes your projects appear on my homepage and visa-versa  smile

thanks for that block code, I'll get to it in a bit when I have a mo.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#521 2010-11-25 14:28:40

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

I love the way that a) you think you have to ask me if you can add me as a friend, and b) that you thank me before I answer  tongue  Of course, you're welcome to add me, it just makes your projects appear on my homepage and visa-versa  smile

thanks for that block code, I'll get to it in a bit when I have a mo.

LOL Thanks again. At first I didn't know you were talking to me because I didn't think you would reply within 3 seconds. XD XP Hmm... I guess Windows XP likes sticking its tong out


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#522 2010-11-25 14:36:31

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Welcome to the OLD local block library!

I didn't realise you'd just posted  tongue


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#523 2010-11-25 17:25:32

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: Welcome to the OLD local block library!

BYOB block: drag and drop me
block pic:http://i.imgur.com/hYIuD.jpg

block script:http://i.imgur.com/671EO.jpg

sorry the pics are a little messed up. maybe you can fix them.

Last edited by owetre18 (2010-11-25 17:26:10)

Offline

 

#524 2010-11-26 15:57:36

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: Welcome to the OLD local block library!

all but (number) of [list] block for byob. I'm new to this, but good.

Blocks picture: http://i.imgur.com/2Z4hs.gif

Script picture (in the block maker):
http://i.imgur.com/LwGBM.png

credit to whoever made to (all but first of [list]) block. This block was based off of that block

Last edited by owetre18 (2010-11-26 18:10:20)

Offline

 

#525 2010-11-26 16:43:39

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: Welcome to the OLD local block library!

say script block (for byob)

http://i.imgur.com/xFBXy.gif

http://i.imgur.com/PG3mR.png

what this block does: the sprite you put it in, says the script you put in it.

Offline

 

Board footer