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

#426 2010-11-02 17:47:48

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

Re: Welcome to the OLD local block library!

there are clone and delete blocks in the scratch section!


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

Offline

 

#427 2010-11-02 19:33:32

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

Re: Welcome to the OLD local block library!

Hardmath123 wrote:

I'm relatively new at this, so here's my first block:

Code:

('pi' #r #pi)

Code:

pi
    ^ 3.141592653

Pretty simple, you don't have to add it if you don't want to.

Hey, I made that same block!


Marzipan11 must learn to not spoil

Offline

 

#428 2010-11-02 19:37:03

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

Re: Welcome to the OLD local block library!

zorket wrote:

Hey, I made that same block!

Most likely you both had the same idea--"great minds think alike!"  smile

Last edited by nXIII (2010-11-02 19:37:18)


nXIII

Offline

 

#429 2010-11-02 20:49:57

Marioblender
Scratcher
Registered: 2010-04-04
Posts: 31

Re: Welcome to the OLD local block library!

I have three more blocks to be added to the list:
<beep>
[blockspec] ('beep' - doBeep)

Code:

doBeep
     self beep

<showing?>
[blockspec] ('showing?' #b #getHidden)

Code:

getHidden
    self isHidden = false ifTrue: [^ true].
    ^ false

<save stage area to sprite>
https://lh4.googleusercontent.com/HL1M9J0n0rP1uxoOX64RcHOeZSXjI4rtEGhCD_p2OGqYdTUaE8UO7n5eHjoSa71VSRSg-GMyxs_cQrfRgkAhyWwqyA=s512
[blockspec] ('save stage area to sprite' #- #grabFromScreen)
no code is needed
All by LS97

Last edited by Marioblender (2010-11-07 20:11:14)

Offline

 

#430 2010-11-03 02:39:41

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Welcome to the OLD local block library!

a new block

bounce

Code:

bounce
    self rotationDegrees: rotationDegrees + 180

blockspec

Code:

('bounce' #- #bounce)

Offline

 

#431 2010-11-03 03:40:03

sonicjosh
Scratcher
Registered: 2007-10-28
Posts: 86

Re: Welcome to the OLD local block library!

Marioblender wrote:

I have three more blocks to be added to the list:
<beep>
[blockspec] ('beep' - doBeep)

Code:

doBeep
     self beep

<showing?>
[blockspec] ('showing?' #b #getHidden)

Code:

getHidden
    self isHidden = false ifTrue: [^ true].
    ^ false

<save stage area to sprite>
https://lh4.googleusercontent.com/HL1M9 … WwqyA=s512
[blockspec] ('save stage area to sprite' #- #grabFromScreen)
no code is needed

Did you get the 'save stage area to sprite' from LS97's post? It is the exact same. I don't think it is fair to post it without credit.

Edit: Hey... The showing block is from there too! I'm not trying to be mean but don't steal blocks from people.

Last edited by sonicjosh (2010-11-03 03:44:23)


http://i35.tinypic.com/14yacn6.jpg
Need help with your mod? Visit Mod Central!

Offline

 

#432 2010-11-03 17:12:49

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

Re: Welcome to the OLD local block library!

New idea:
We should have a 'page' for symbols. Such as ≤, ≥, and turn (counter)clockwise. I have no idea how to get any without coping and pasting.


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

Offline

 

#433 2010-11-03 17:29:35

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

Re: Welcome to the OLD local block library!

I could add a link to This site, it has a load of alt codes, but not only do alt codes not work on macs, special characters are rarlely needed for blocks....


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

Offline

 

#434 2010-11-03 20:19:41

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

Re: Welcome to the OLD local block library!

Error: sometimes people use source, and some do not. This can get blockspecs tied up.  sad  Mark the blockspecs source and non-source.
Blockspec for the (report () ) block in each code:

non-source: ('report %s' #r #report:)

source: ('report %s' r report:)

I use non-source.


Marzipan11 must learn to not spoil

Offline

 

#435 2010-11-04 10:53:51

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

Re: Welcome to the OLD local block library!

sparks wrote:

I could add a link to This site, it has a load of alt codes, but not only do alt codes not work on macs, special characters are rarlely needed for blocks....

That would work, if you think it a good idea.


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

Offline

 

#436 2010-11-04 11:04:46

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

Re: Welcome to the OLD local block library!

Code:

('Spawn Variable' #- #addGlobalVariable)

Code:

no code needed

Makes a new variable.

Last edited by Hardmath123 (2010-11-04 11:28:04)


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

Offline

 

#437 2010-11-04 11:26:29

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

Re: Welcome to the OLD local block library!

Code:

('%b' #r #booleanstring:)
('%s' #b #booleanstring:)

Code:

booleanstring: t1 
    ^ t1

my first script with variables.
Converts booleans to strings and vice-versa.

Last edited by Hardmath123 (2010-11-18 08:47:51)


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

Offline

 

#438 2010-11-04 11:33:53

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

Re: Welcome to the OLD local block library!

right guys, I can see there's pleanty to update, I'm away this evening though - I'm helping out at a firework event! Anyhoo, I won't be updating until friday evening (my time)  smile


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

Offline

 

#439 2010-11-04 12:22:00

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

Re: Welcome to the OLD local block library!

This site is good for extra characters


You can now reach me on Twitter @johnnydean1_

Offline

 

#440 2010-11-04 12:56:02

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

Re: Welcome to the OLD local block library!

More...

Code:

('%b is the same value as %b' #b #same:test:)

Code:

same: t1 test: t2 
    t1 = t2 ifTrue: [^ true].
    ^ false

tells whether or not the two booleans are the same.
My first block with "if".

P.S. I technically do not know squeak, I am deriving the codes from the already-there programs.


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

Offline

 

#441 2010-11-04 13:13:34

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

Re: Welcome to the OLD local block library!

Last one today:

Code:

('Comment from maker:%s' #- #falsetest: #commenthere)

Code:

falsetest: t1 
    ^ t1

lets one insert comments. Experimenting with default settings...


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

Offline

 

#442 2010-11-04 16:52:15

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: Welcome to the OLD local block library!

('add list' #- #addList) - add list
Purpose: Brings up the dialog box to add a list.


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&amp;online=http://lemonfanatic.webs.com/ONLINE.png&amp;offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#443 2010-11-04 16:56:52

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Welcome to the OLD local block library!

Marioblender wrote:

<showing?>
[blockspec] ('showing?' #b #getHidden)

Code:

getHidden
    self isHidden = false ifTrue: [^ true].
    ^ false

Optimisation

Code:

getHidden
^ self isHidden not

/* No comment */

Offline

 

#444 2010-11-04 16:57:23

bigreader
Scratcher
Registered: 2007-08-14
Posts: 100+

Re: Welcome to the OLD local block library!

Marioblender wrote:

Code:

getHidden
    self isHidden = false ifTrue: [^ true].
    ^ false

Optimized, you get this:

Code:

getHidden
     ^self isHidden not

For even more optimization, use this blockspec:

Code:

('I am hidden?' #b #isHidden)

I'm currently taking a break from Scratch.
Zing - now even easier to install!

Offline

 

#445 2010-11-04 17:32:31

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: Welcome to the OLD local block library!

http://imageupload.org/?di=11128890632012
Shared by HD123
Blockspec:

('point towards x:%n y:%n' #- #pointToX:y: 0 0)

no code needed
What it does:
This block will make any sprite point toward a certain coordinate, specified by the user.


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&amp;online=http://lemonfanatic.webs.com/ONLINE.png&amp;offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#446 2010-11-07 14:50:39

chippo
New Scratcher
Registered: 2010-09-03
Posts: 6

Re: Welcome to the OLD local block library!

Could someone make a hat block something like this?
_________
/              \___________
| When <  >___________|
  \_/
Thanks!

Offline

 

#447 2010-11-07 15:28:02

chippo
New Scratcher
Registered: 2010-09-03
Posts: 6

Re: Welcome to the OLD local block library!

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.

Offline

 

#448 2010-11-08 00:35:43

Guinea_Pig_Girl
Scratcher
Registered: 2010-08-25
Posts: 100+

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.

That would be cool! Have you posted it in the Suggestions forum yet?  smile


http://img841.imageshack.us/img841/783/misstdd.png
Put this in your siggy if you miss The_Dancing_Donut!

Offline

 

#449 2010-11-09 06:25:18

Guinea_Pig_Girl
Scratcher
Registered: 2010-08-25
Posts: 100+

Re: Welcome to the OLD local block library!

Double posting I know, but I just made a block that works!!!!! Here's a picture:
http://lh6.ggpht.com/_MRv2zxg8oVs/TNkumqcOTuI/AAAAAAAAAX8/EdkYVYdQ0SI/s800/spriteglide.PNG
It makes the sprite glide to another sprite. But, you have to type the correct name in.  smile
And, of course, the programming!  big_smile
http://lh5.ggpht.com/_MRv2zxg8oVs/TNkumDRnKWI/AAAAAAAAAX4/7H6e5yoH_Xw/s288/coding.PNG
(The "sprite" input is an Any Type. Text doesn't work for me.)


http://img841.imageshack.us/img841/783/misstdd.png
Put this in your siggy if you miss The_Dancing_Donut!

Offline

 

#450 2010-11-09 13:43:34

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Welcome to the OLD local block library!

what about a transition to costume [costume2^] over (2) secs in looks

i dont know how to code, sorry

here is how it will look and work http://scratch.mit.edu/projects/scimonster/1334438
i made this using paint editor and it works with 2 sprites and ghost effect

Edit: i might have the blockspecs

Code:

('transition to costume %l over %n secs' #r #TransToCostume)

Last edited by scimonster (2010-12-07 06:35:31)

Offline

 

Board footer