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

#801 2010-12-18 15:00:35

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

Re: Welcome to the OLD local block library!

Hardmath123 wrote:

More blocks:


Go to random x/y position:

Code:

('go to random x-y position' #- #randxypos)

Code:

randxypos
    self gotoX: (self randomFrom: -240 to: 240)
        y: (self randomFrom: -180 to: 180)

Distance to given point:

Code:

 ('distance to x %n y %n' #r #dist:and:)

Code:

dist: t1 and: t2 
    ^ (self xpos - t1 * (self xpos - t1) + (self ypos - t2 * (self ypos - t2))) abs sqrt

Reports greater value of two numbers:

Code:

('greater of %n and %n' #r #greater:and:)

Code:

greater: t1 and: t2 
    t1 > t2 ifTrue: [^ t1].
    ^ t2

Reports lesser value of two numbers:

Code:

('lesser of %n and %n' #r #lesser:and:)

Code:

lesser: t1 and: t2 
    t1 < t2 ifTrue: [^ t1].
    ^ t2

Tells whether or not pen is down:

Code:

('Pen down?' #b #penDownorUp)

Code:

penDownorUp
    ^ penDown

Gives a random truth value:

Code:

('true or false' #b #truefalse)

Code:

truefalse 
    | t3 t4 t5 |
    t3 _ 1 min: 2.
    t4 _ 1 max: 2.
    t5 _ RandomGen next * (t4 - t3) + t3.
    t3 isInteger & t4 isInteger
        ifTrue: [t5 _ (RandomGen next * (t4 + 1 - t3)) truncated + t3]
        ifFalse: [t5 _ RandomGen next * (t4 - t3) + t3].
    t5 = 1 ifTrue: [^ true].
    t5 = 2 ifTrue: [^ false]

Gives one of the inputs, randomly. These are 2 blocks.

Code:

('%s or %s' #r #a:orb:) ('%b or %b' #b #a:orb:)

Code:

a: hi orb: bye 
    | t3 t4 t5 |
    t3 _ 1 min: 2.
    t4 _ 1 max: 2.
    t5 _ RandomGen next * (t4 - t3) + t3.
    t3 isInteger & t4 isInteger
        ifTrue: [t5 _ (RandomGen next * (t4 + 1 - t3)) truncated + t3]
        ifFalse: [t5 _ RandomGen next * (t4 - t3) + t3].
    t5 = 1 ifTrue: [^ hi].
    t5 = 2 ifTrue: [^ bye]

Joins the two values with a space in between.

Code:

('join %s and %s with a space' #r #join:spaces: #hello #world)

Code:

join: t1 spaces: t2 
    ^ t1 asString asUTF8 , ' ' , t2 asString asUTF8

The key [^] pressed block with a string input instead.

Code:

('key %s pressed?' #b #keyPressed:)

Code:

no code needed

Asks the input in a dialog box and reports the value.

Code:

('ask %s and report' #r #ask:)

Code:

ask: t1 
    | t2 |
    t2 _ StringDialog ask: t1.
    ^ t2

You do noticed some of those blocks were copied. Like the or blocks. The only ones I see very necessary are the lesser of, greater of, distance to, random x y, ask and report.

Last edited by Pecola1 (2010-12-18 15:12:41)


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

 

#802 2010-12-18 15:13:14

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

Re: Welcome to the OLD local block library!

My internet has been down and may go down again


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

 

#803 2010-12-18 15:17:04

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

Re: Welcome to the OLD local block library!

does anyone have the link to the script image for meowmeow55's http://img193.imageshack.us/img193/5361/19709349.gif block? I accidentally lost it while updating  hmm


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

Offline

 

#804 2010-12-18 15:28:06

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

Re: Welcome to the OLD local block library!

sparks wrote:

does anyone have the link to the script image for meowmeow55's http://img193.imageshack.us/img193/5361/19709349.gif block? I accidentally lost it while updating  hmm

I made it once. This is what I did:
http://www.weebly.com/uploads/5/4/1/3/5413503/1435839.gif


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

 

#805 2010-12-18 15:38:31

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

Re: Welcome to the OLD local block library!

How does the quit BYOB block work? Freeze up?


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

 

#806 2010-12-18 17:31:20

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

Re: Welcome to the OLD local block library!

sparks wrote:

does anyone have the link to the script image for meowmeow55's http://img193.imageshack.us/img193/5361/19709349.gif block? I accidentally lost it while updating  hmm

Here it is!
I keep the URLs of everything I upload to Tinypic in a handy text file  big_smile

Pecola1 wrote:

How does the quit BYOB block work? Freeze up?

See this thread.


Yawn.

Offline

 

#807 2010-12-18 17:48:43

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

Re: Welcome to the OLD local block library!

meowmeow55 wrote:

Pecola1 wrote:

How does the quit BYOB block work? Freeze up?

See this thread.

Yes I made the block and noticed i was playing around once and made it! It closed BYOB and I was sad cuz I didn't get to save it.


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

 

#808 2010-12-18 17:54:01

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

Re: Welcome to the OLD local block library!

New Panther block (the following is not a joke)

Code:

Pecola1
obsolete!
-
#FF0000
self error

Or
First box

obsolete!

second box

-

third box

self error

and the color is red

Last edited by Pecola1 (2010-12-18 17:57: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

 

#809 2010-12-18 18:00:25

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

Re: Welcome to the OLD local block library!

I found out how to make a transparent block on Panther! (you all probably know this) In the color box click and then drag it off of the Panther window.


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

 

#810 2010-12-18 18:01:04

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

Re: Welcome to the OLD local block library!

I felt like making a block just now, so here it is!
http://i53.tinypic.com/2yycw7s.gif
It would probably give you better results if you made it atomic.
It's also uploaded here!


Yawn.

Offline

 

#811 2010-12-19 05:02:23

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Welcome to the OLD local block library!

You put so much work into this guide sparks  yikes


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#812 2010-12-19 07:22:14

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

Re: Welcome to the OLD local block library!

which guide?  smile

_______________________________________________________

Meowmeow55, I have emailed you a load of motion blocks! Let me know when they're hosted!

Last edited by sparks (2010-12-19 07:47:59)


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

Offline

 

#813 2010-12-19 08:17:17

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

Re: Welcome to the OLD local block library!

I wanted to enter in that christmas contest, but it wouldn't LET me grab it's URL.


Marzipan11 must learn to not spoil

Offline

 

#814 2010-12-19 08:42:06

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

Re: Welcome to the OLD local block library!

grab what URL? The url for the "more info" link is http://scratch.mit.edu/forums/viewtopic.php?pid=624738#p624738


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

Offline

 

#815 2010-12-19 13:21:37

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

Re: Welcome to the OLD local block library!

sad  Pecola, why?


Marzipan11 must learn to not spoil

Offline

 

#816 2010-12-19 13:22:39

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

Re: Welcome to the OLD local block library!

sparks wrote:

grab what URL? The url for the "more info" link is http://scratch.mit.edu/forums/viewtopic.php?pid=624738#p624738

The URL for my picture.


Marzipan11 must learn to not spoil

Offline

 

#817 2010-12-19 14:05:41

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

Re: Welcome to the OLD local block library!

... then I can't really help you, I don't know where you've loaded it...


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

Offline

 

#818 2010-12-19 15:12:59

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Welcome to the OLD local block library!

Just an idea... why don't you make this into a website? Maybe you could add a form were users can upload their own block automatically.  smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#819 2010-12-19 15:30:22

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

Re: Welcome to the OLD local block library!

Daffy22 wrote:

Just an idea... why don't you make this into a website? Maybe you could add a form were users can upload their own block automatically.  smile

I've been thinking about this for a while and there are a lot of things to consider there.

For:
A website would allow me to moderate it, and probably allow me to cut back on the amount of work needed to add a block.

With a website, a form could potentally allow a user to instantly share their blocks.

Catagorised searching, download counting and other nifty tools could be introduced to make things more exciting and easy to use.

Other people could act as moderators when I'm busy or on holiday.

Once I leave Scratch (going to Uni soon) Someone will be able to keep this post alive.

Against:

This is currently on the Scratch site. It makes it part of the community and is easily accessable for all scratchers.

It's an I-topic'd thread, and I'm not sure clearing it and just posting a link to a website I own is allowed...

Constant posts keep this thread near the top, where new users are likely to discover it and benifit from the contents. Allowing it to sink to the bottom will reduce the usage it gets. Not as many people will see it through the stickied link post at the top.

I quite enjoy exploiting the bbocode in every way possible to make this an unusual and colourful thread. It's a challange!

I'd have to pay for a website host.

I don't know much HTML and next to no php. So most of the features in the "for" section above would not be possible to implement.
______________________________________________________________________________

So if all the problems in the against section could be solved more or less, Yes, I'd love to make it a website  tongue

Last edited by sparks (2010-12-19 15:32:14)


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

Offline

 

#820 2010-12-19 15:55:31

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Welcome to the OLD local block library!

sparks wrote:

Daffy22 wrote:

Just an idea... why don't you make this into a website? Maybe you could add a form were users can upload their own block automatically.  smile

I've been thinking about this for a while and there are a lot of things to consider there.

For:
A website would allow me to moderate it, and probably allow me to cut back on the amount of work needed to add a block.

With a website, a form could potentally allow a user to instantly share their blocks.

Catagorised searching, download counting and other nifty tools could be introduced to make things more exciting and easy to use.

Other people could act as moderators when I'm busy or on holiday.

Once I leave Scratch (going to Uni soon) Someone will be able to keep this post alive.

Against:

This is currently on the Scratch site. It makes it part of the community and is easily accessable for all scratchers. - Still use this topic as a suggestions thread

It's an I-topic'd thread, and I'm not sure clearing it and just posting a link to a website I own is allowed...

Constant posts keep this thread near the top, where new users are likely to discover it and benifit from the contents. Allowing it to sink to the bottom will reduce the usage it gets. Not as many people will see it through the stickied link post at the top. - Still use this topic as a suggestions thread

I quite enjoy exploiting the bbocode in every way possible to make this an unusual and colourful thread. It's a challange!  - You haven't tried HTML yet  tongue 

I'd have to pay for a website host.  - No there are 1000's of free hosts

I don't know much HTML and next to no php. So most of the features in the "for" section above would not be possible to implement.  - I don't mind making scripts for you  wink
______________________________________________________________________________

So if all the problems in the against section could be solved more or less, Yes, I'd love to make it a website  tongue

I can help with a few of the against thing  smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#821 2010-12-19 16:07:57

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

Re: Welcome to the OLD local block library!

Sounds interesting... If you want to work in collaberation with me, Daffy22, I'd love to give it a go  smile  (If you've got time with all the other stuff you're doing!) Certainly, I've got the next two weeks off sixthform, so apart from a few essays, I have bundles of time!


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

Offline

 

#822 2010-12-19 16:29:22

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

Re: Welcome to the OLD local block library!

I tested the hide and show cursor blocks. they work!

Offline

 

#823 2010-12-19 16:34:30

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

Sounds interesting... If you want to work in collaberation with me, Daffy22, I'd love to give it a go  smile  (If you've got time with all the other stuff you're doing!) Certainly, I've got the next two weeks off sixthform, so apart from a few essays, I have bundles of time!

I was thinking about this for a while, but I never got around to talking about it. I'd love to help!  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#824 2010-12-19 17:15:35

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

Re: Welcome to the OLD local block library!

My thoughts about the website idea:
It sounds like a good idea at first, but I think that is being easily accessible is very important. With it being a website scratchers will be drawn away.
The text on the home-post is great, but wouldn't have the same welcoming feel if had a link at the end.

Oh, and I have the giant key blocks for the download thing. I'll send them to meowmeow55 now.

Last edited by SSBBM (2010-12-19 17:17:00)


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

Offline

 

#825 2010-12-19 17:44:48

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

Re: Welcome to the OLD local block library!

SSBBM wrote:

Oh, and I have the giant key blocks for the download thing. I'll send them to meowmeow55 now.

You left off a bunch of script in the <key [] pressed?> block!


Yawn.

Offline

 

Board footer