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

#376 2010-10-22 10:42:05

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

Re: Welcome to the OLD local block library!

http://dl.dropbox.com/u/6273449/BlockLibraryTitle2.png
^Back to Panther blocks

downloading a Panther block

Download the block
or follow the tutorial:

To download a Panther block from the library, follow these steps:

Open Panther and go to the variables tab. Scroll down and select "make a block". A popup box will appear asking for the block name. paste in this code:

Code:

download block $Number$ from block library

http://img805.imageshack.us/img805/6205/78060984.png

Click OK. A new window will appear with several boxes in it. The top one has the text you just entered. choose a colour from the colour swatch in the top right corner, and copy this code into the large box:

Code:

|maker link t2 t3 t4|
link_'http://dl.dropbox.com/u/6273449/', t1 asString, '.txt'.
maker_self readLine: 1 FromUrl: link.
t1_self readLine: 2 FromUrl: link.
t2_self readLine: 3 FromUrl: link.
t4_self readLine: 4 FromUrl: link.
t4_self stringAsColor: t4.
t3_self readLine: 5 FromUrl: link.

createdBlocks at: t1 put: {t1. t1. '-'. ''. self class blockColorFor: 'custom'}.createdBlocks at: t1 put: {t1. t1. t2. t3. t4}.(t4 _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [t4 viewerPane categoryChanged: 'variables'].

self showInformDialog: 'sucess!' withText: 'The block has been added to your variables tab.', '
', 'The "', t1, '" block', '
', ' was shared by ', maker

so it looks like this:
http://img149.imageshack.us/img149/1879/87130624.png

Click Ok and you should find a new block in the variables tab at the bottom that looks like this:
http://img818.imageshack.us/img818/7799/48678810.gif

Once you have this block, you can browse the Panther section of the block library for a block you want, and then enter the "block number" next to it into your download block. Double click the block to make it work and the new block will be added to the variables tab along with the rest. Click here to start browsing Panther blocks.

http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
^Back to Panther blocks

Last edited by sparks (2011-01-22 03:01:24)


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

Offline

 

#377 2010-10-22 10:47:18

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

Re: Welcome to the OLD local block library!

^ new block making tutorial for the Panther section! If you think you can make a good tutorial similar to this one for Scratch or BYOB, I would love to add it to the gallery!


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

Offline

 

#378 2010-10-22 14:28:29

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

Re: Welcome to the OLD local block library!

sparks wrote:

good points there meowmeow55, If I used that block I would want the sprite that drew it to return to it's original position with it's pen up as if it hadn't drawn the line (though what if the pen was already down before the line was drawn?)

We'd need a <pen down?> boolean block for that...

I've added those new blocks, however, how did you get the <= and => symbols? I tried the supposedly correct alt codes 242 and 243 but got ‗ and ¾ for some reason...

I used the character map  big_smile


Yawn.

Offline

 

#379 2010-10-22 21:59:26

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

Re: Welcome to the OLD local block library!

http://dl.dropbox.com/u/6273449/BlockLibraryTitle2.png
^Back to BYOB blocks


Making a BYOB block from the library

1) Open BYOB and go to the bottom of the variables tab. Click on the "make a block" button. OR right-click and press 'make a block'
http://img704.imageshack.us/img704/6202/byob1.png

2) A window appears. Type the name of the block into the text box. Select the category and type of block then click OK
http://img526.imageshack.us/img526/1447/byob2.png

3)A new window appears. Drag the blocks (like you would do for a normal script) that are in the library.
http://img412.imageshack.us/img412/3628/byob3.png

4)To add variables
a)add the block 'script variables () >' to add some that the user can not see or change (unless changing other vars)
b)click + next to any text for some like http://i56.tinypic.com/2mo9ht2.gif
http://img99.imageshack.us/img99/7290/byob4.png http://img258.imageshack.us/img258/6726/byob5.png

5) With any luck you can drag out the new block and use it! If you take a block from the library that does not have a http://i53.tinypic.com/5bqjxh.jpg image next to it, do post in this thread and share whether it worked or not!

____________________________________
^Back to BYOB blocks

Last edited by SSBBM (2010-12-02 15:44:35)


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

Offline

 

#380 2010-10-22 22:45:11

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

how did you get the <= and => symbols? I tried the supposedly correct alt codes 242 and 243 but got ‗ and ¾ for some reason...

Character map, maybe?


nXIII

Offline

 

#381 2010-10-23 06:39:06

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Welcome to the OLD local block library!

≤ ≥

There!


You can now reach me on Twitter @johnnydean1_

Offline

 

#382 2010-10-24 07:54:29

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

Re: Welcome to the OLD local block library!

SSBBM, loving your BYOB tutorial there! I've linked it to the BYOB post!

Anyone fancy the terribly harder task of creating a "how to find the right place in the code" plus the "shift click the R" bits?  smile


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

Offline

 

#383 2010-10-24 13:21:17

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

Re: Welcome to the OLD local block library!

This is sitting in the glossary, and no one has brought it up, so I will:

sparks wrote:

Instance: commonly misunderstood word... not sure what it means myself, please do post a lamen's terms explaination for this!

Can anyone explain how this word came to be so commonly misused and what the real definition is (and why it is used on a button in the third panel of Scratch's System Browser, while we're at it)?


Yawn.

Offline

 

#384 2010-10-24 13:43:25

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

Re: Welcome to the OLD local block library!

meowmeow55 wrote:

This is sitting in the glossary, and no one has brought it up, so I will:

sparks wrote:

Instance: commonly misunderstood word... not sure what it means myself, please do post a lamen's terms explaination for this!

Can anyone explain how this word came to be so commonly misused and what the real definition is (and why it is used on a button in the third panel of Scratch's System Browser, while we're at it)?

I'm not sure at all what it means, merely that what I think it means is probably wrong...
a proper explaination would, I'm sure help to clear this up  tongue


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

Offline

 

#385 2010-10-24 14:01:58

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

For Squeak?

A form of a class that executes once called, and can launch once it is called or a condition is met in it's class.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#386 2010-10-24 14:20:31

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Welcome to the OLD local block library!

Okay, instance:
An instance is (in Squeak) an object with some class as its data type. The instance has its own set of properties (variables) and methods (functions) which can be different from those of another instance. In a Squeak browser, the "instance" and "class" buttons let the user edit both the instance methods (those belonging to every instance created) and the class methods (those belonging to the class itself but accessible by anything).

Confusion has come up around the word "instance" because it is often incorrectly used as a word for "instance method" or "method" because of its location and use in a Squeak system browser.

For further reading see:
- Instance (Computer Science)
- Object-Oriented Programming
- Squeak


nXIII

Offline

 

#387 2010-10-24 14:32:49

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

nXIII wrote:

Okay, instance:
An instance is (in Squeak) an object with some class as its data type. The instance has its own set of properties (variables) and methods (functions) which can be different from those of another instance. In a Squeak browser, the "instance" and "class" buttons let the user edit both the instance methods (those belonging to every instance created) and the class methods (those belonging to the class itself but accessible by anything).

Confusion has come up around the word "instance" because it is often incorrectly used as a word for "instance method" or "method" because of its location and use in a Squeak system browser.

For further reading see:
- Instance (Computer Science)
- Object-Oriented Programming
- Squeak

I tried.  tongue


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#388 2010-10-24 17:25:40

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

Re: Welcome to the OLD local block library!

Thanks very much, nXIII, I like the external links, though I think we're going to need definitions in the glossary for functions, classes methods  big_smile


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

Offline

 

#389 2010-10-25 14:08:26

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

Re: Welcome to the OLD local block library!

I have't had much computer time so:

meowmeow55 wrote:

What exactly is that block supposed to do? I don't get what the comments are trying to convey either.

It's hard to say. It wasn't a good block anyways. Sparks, you can delete it.

BTW, you should make an image for the List category, too.

http://img684.imageshack.us/img684/4837/listblock.gif

Also, should your "make a line from ..." block make the sprite go back to its original position after drawing a line, and make the pen go back up?

http://img96.imageshack.us/img96/8004/makelinescripts.gif
--------------------------------

sparks wrote:

SSBBM, loving your BYOB tutorial there! I've linked it to the BYOB post!

Thanks! If you want, you can copy and repost it so you can edit it and I'll delete mine.
--------------------------------

johnnydean1 wrote:

It should be report true

http://img80.imageshack.us/img80/4678/wait.gif
--------------------------------
And I have http://i53.tinypic.com/5bqjxh.jpg
http://img257.imageshack.us/img257/681/53919929.gif
http://www.weebly.com/uploads/4/0/7/6/4076678/1711332.gif

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


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

Offline

 

#390 2010-10-25 19:56:13

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

zorket wrote:

To make a scratch block:

1.) Open scratch, shift click in the loop in R:
http://newsimg.bbc.co.uk/media/images/4 … ch_203.jpg
The blue text does not appear in the editor, so open the editor.
Then click on the white space that appears, go to open-browser.
2.) The browser should look like:
http://www.gershmer.net/runtimeimage/runtime4.jpeg You really should be working on 1.4.
Go above, and click scratch objects.
[Scratch sprite morph for sprite only blocks, Scratch stage morph for stage blocks only, and ScriptableScratchMorph for both, go to ScriptableScratchMorph in the example, please]
Then you go LOW and press class. then go to the third pane, click blockspecs//scratch. In the 4th pane, blockspecs.
3.) Here's a really hard step. You have to locate yourself where the blockspec goes!
Alright. If you are following the tutorial, you should be in ScriptableScratchMorph.
Find 'control'. look across the line, and you will see a #-. Use a #- when you want to put a space in. And you will find a ('repeat %n' #c #doRepeat 10).

Code:

The block contents is first in the brackets. There have to be brackets for strings, always. example: 'repeat %n'
________________________
The #c tells what type of block this is. Here is a list:
#-   no arguments (command or 'stack' block)
#r   Reporter block (the round ones)
#b   boolean block (diamond shaped)
#c   C shaped block (like the forever block)
#t   Time block (like wait X secs)
#W   'when' hat block (obsolete)
#S   start button click hat block
#K   key-activated hat block
#E   event hat block (broadcast)
#s   special form (hard to code)
Credit to ls97 for this list.
______________________
The #doRepeat 10 is the command. It has to be exact to the name of the code.

You also might be wondering what the %n is doing there.
This indicates a numberical inserter. Here is a list of them:

Code:

a:  attribute of another sprite, such as X position or size.
b:  a boolean inserter
c:  a colour picker that shows the menu.
C:  a colour picker that doesn't
d:  the sprite direction menu/numerical inserter.
D:  the menu for midi drums
e:  The broadcast message menu
f:  math function menu (with sin, abs, etc.)
g:  menu for the different graphic effects.
h:  numerical sensor board selector menu
H:  boolean sensor board selector menu
i:  midi instrument menu/numerical inserter
k:  menu for the names of the different keys, used in the key sensor blocks.
l:  menu with the costume names of the given sprite.
L:  list name menu.
m:  sprite list
n:  numerical inserter
N:  note name menu/inserter
s:  string inserter
S:  sound selector menu
v:  variable labels menu
y:  menu used to delete either a number of the last value or all of a list.

Credit to ls97 and billyedward for this list.
Alright, for the tutorial, were gonna make the ( report (hello) ) block. Add the blockspec: ('report %s' #r #report: 'hello') Place it in control or operators.


4.) Now were going to move on to codes. Some blocks already have the code installed.
For the ( report (hello) ) block were doing, there is a place were gonna put this code.
Click on instance in the 2nd pane low. In the third pane, other ops, and the 4th, add new code or replace any code. Use the code for the ( report (hello) ) block:

Code:

report: t1
^ t1

this is the short code. Accept.
I'm gonna help you figure out more stuff. Here's an extra-long helpers code:

Code:

report: t1
| t2 t3 |
t1 _ t2
t2 _ t3
t3 = t1 ifTrue: [^ t1]

The | t2 t3| adds the variables t2 and t3 to the code.
t1 _ t2 makes t2 equal t1.
t2 _ t3 makes t3 equal t2.
t3 = t1 ifTrue: [^ t1] checks if t3 = t1, if it does, it does the command inside [], and ^ makes it report t1 (the string)
There you go! With a little practice, you can make your own blocks! Oh, I almost forgot. Close the green code, and turn fill screen on with the first in step 1. If you are positive you want this block permonant, use the shift-click methood and click save-image.

With this tutorial, there are no bondaries for blocks.
You can even make a [if touching (a sprite), die] block!!!

We have several of these already. Could you please delete this so that we have more forum space?  big_smile

And also, check out Cool Custom Blocks In Scratch to see the full tutorial (as of now  big_smile , made by LS97)


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#391 2010-10-26 08:03:58

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: Welcome to the OLD local block library!

bbbeb wrote:

zorket wrote:

To make a scratch block:

1.) Open scratch, shift click in the loop in R:
http://newsimg.bbc.co.uk/media/images/4 … ch_203.jpg
The blue text does not appear in the editor, so open the editor.
Then click on the white space that appears, go to open-browser.
2.) The browser should look like:
http://www.gershmer.net/runtimeimage/runtime4.jpeg You really should be working on 1.4.
Go above, and click scratch objects.
[Scratch sprite morph for sprite only blocks, Scratch stage morph for stage blocks only, and ScriptableScratchMorph for both, go to ScriptableScratchMorph in the example, please]
Then you go LOW and press class. then go to the third pane, click blockspecs//scratch. In the 4th pane, blockspecs.
3.) Here's a really hard step. You have to locate yourself where the blockspec goes!
Alright. If you are following the tutorial, you should be in ScriptableScratchMorph.
Find 'control'. look across the line, and you will see a #-. Use a #- when you want to put a space in. And you will find a ('repeat %n' #c #doRepeat 10).

Code:

The block contents is first in the brackets. There have to be brackets for strings, always. example: 'repeat %n'
________________________
The #c tells what type of block this is. Here is a list:
#-   no arguments (command or 'stack' block)
#r   Reporter block (the round ones)
#b   boolean block (diamond shaped)
#c   C shaped block (like the forever block)
#t   Time block (like wait X secs)
#W   'when' hat block (obsolete)
#S   start button click hat block
#K   key-activated hat block
#E   event hat block (broadcast)
#s   special form (hard to code)
Credit to ls97 for this list.
______________________
The #doRepeat 10 is the command. It has to be exact to the name of the code.

You also might be wondering what the %n is doing there.
This indicates a numberical inserter. Here is a list of them:

Code:

a:  attribute of another sprite, such as X position or size.
b:  a boolean inserter
c:  a colour picker that shows the menu.
C:  a colour picker that doesn't
d:  the sprite direction menu/numerical inserter.
D:  the menu for midi drums
e:  The broadcast message menu
f:  math function menu (with sin, abs, etc.)
g:  menu for the different graphic effects.
h:  numerical sensor board selector menu
H:  boolean sensor board selector menu
i:  midi instrument menu/numerical inserter
k:  menu for the names of the different keys, used in the key sensor blocks.
l:  menu with the costume names of the given sprite.
L:  list name menu.
m:  sprite list
n:  numerical inserter
N:  note name menu/inserter
s:  string inserter
S:  sound selector menu
v:  variable labels menu
y:  menu used to delete either a number of the last value or all of a list.

Credit to ls97 and billyedward for this list.
Alright, for the tutorial, were gonna make the ( report (hello) ) block. Add the blockspec: ('report %s' #r #report: 'hello') Place it in control or operators.


4.) Now were going to move on to codes. Some blocks already have the code installed.
For the ( report (hello) ) block were doing, there is a place were gonna put this code.
Click on instance in the 2nd pane low. In the third pane, other ops, and the 4th, add new code or replace any code. Use the code for the ( report (hello) ) block:

Code:

report: t1
^ t1

this is the short code. Accept.
I'm gonna help you figure out more stuff. Here's an extra-long helpers code:

Code:

report: t1
| t2 t3 |
t1 _ t2
t2 _ t3
t3 = t1 ifTrue: [^ t1]

The | t2 t3| adds the variables t2 and t3 to the code.
t1 _ t2 makes t2 equal t1.
t2 _ t3 makes t3 equal t2.
t3 = t1 ifTrue: [^ t1] checks if t3 = t1, if it does, it does the command inside [], and ^ makes it report t1 (the string)
There you go! With a little practice, you can make your own blocks! Oh, I almost forgot. Close the green code, and turn fill screen on with the first in step 1. If you are positive you want this block permonant, use the shift-click methood and click save-image.

With this tutorial, there are no bondaries for blocks.
You can even make a [if touching (a sprite), die] block!!!

We have several of these already. Could you please delete this so that we have more forum space?  big_smile

And also, check out Cool Custom Blocks In Scratch to see the full tutorial (as of now  big_smile , made by LS97)

Sorry, but I spent hours posting that. I don't really want to delete it. And I think sparks was looking for a scratch tutorial...?

p.s. I've seen and worked in the cool custom blocks in scratch.

Last edited by zorket (2010-10-26 08:04:12)


Marzipan11 must learn to not spoil

Offline

 

#392 2010-10-26 11:07:01

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

Re: Welcome to the OLD local block library!

My fault, bbeb, I asked for a quick guide to making scratch blocks...

Zorket, the images you use don't all seem to be from scratch, rather than scratch, it says "Based on scratch from the MIT media labs" in the corner... This might be confusing to new users, especially using the scratch logo instead of the one found in scratch itself  tongue  Thank you for your submission all the same:)


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

Offline

 

#393 2010-10-26 16:32:07

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: Welcome to the OLD local block library!

sigh.  sad


Marzipan11 must learn to not spoil

Offline

 

#394 2010-10-26 16:33:31

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

My fault, bbeb, I asked for a quick guide to making scratch blocks...

Zorket, the images you use don't all seem to be from scratch, rather than scratch, it says "Based on scratch from the MIT media labs" in the corner... This might be confusing to new users, especially using the scratch logo instead of the one found in scratch itself  tongue  Thank you for your submission all the same:)

Oh. My bad. But why not make a new topic and post a link?  big_smile


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#395 2010-10-26 17:12:13

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

Re: Welcome to the OLD local block library!

that's what I'm thinking...


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

Offline

 

#396 2010-10-26 17:47:51

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Welcome to the OLD local block library!

New scratch blocks!

Clone sprite
Blockspecs:

Code:

('clone me' #- #duplicate)

This is actually by ScratchReallyRocks, I just posted it here first.

Delete sprite

Code:

('delete me' #- #delete)

this one is based on his, but my code.  smile


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#397 2010-10-26 18:58:21

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: Welcome to the OLD local block library!

True is tested.
All operators iz tethted.

Last edited by zorket (2010-10-26 18:58:57)


Marzipan11 must learn to not spoil

Offline

 

#398 2010-10-27 07:23:10

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

Re: Welcome to the OLD local block library!

zorket wrote:

True is tested.
All operators iz tethted.

All operators for all block types? which set of operators have you tested? Scratch blocks?

Thanks for the new scratch blocks, 16Skittles, I'll add them to the scratch control section. However, I'm going to change the cloning code just a little. With your current code of "duplicate" you end up with the cloned sprite stuck to your mouse pointer until you click. if you use the code "duplicateNoAttatch", the sprite will clone and place itself onto the stage  smile  much more useful for in-game cloning!


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

Offline

 

#399 2010-10-27 13:08:09

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Welcome to the OLD local block library!

^ but it wont work in presentation mode


You can now reach me on Twitter @johnnydean1_

Offline

 

#400 2010-10-27 14:21:41

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

Re: Welcome to the OLD local block library!

does it work without the "NoAttatch"? I thought neither worked in pres mode.


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

Offline

 

Board footer