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

#2601 2012-03-07 16:34:23

LiquidMetal
Scratcher
Registered: 2011-06-15
Posts: 500+

Re: ITopic: Welcome to your local block library!

rookwood101 wrote:

sparks wrote:

Yes, I was quite happily working on that site, but there have been huge issues with SQL database storage that no one seems to be able to fix. I'm currently working on a website for my uni course too, so it's taken a bit of a back seat, sorry  hmm

I've set some things up, and I'm willing to host the block library for you. I'll have the ip for it set up soon (you'll have a seperate one to the rest of the server.) and I'll send you the details so you can have a play around and notify me of anything before commiting to use it.

I don't think hosting the site was the problem.

Offline

 

#2602 2012-03-08 07:46:50

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I have a block, but I made it in Snap, which doesn't have it. It's a rounding block for rounding a value, but Scratch and BYOB have it. Can I still share it?

Offline

 

#2603 2012-03-08 10:39:26

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: ITopic: Welcome to your local block library!

LiquidMetal wrote:

rookwood101 wrote:

sparks wrote:

Yes, I was quite happily working on that site, but there have been huge issues with SQL database storage that no one seems to be able to fix. I'm currently working on a website for my uni course too, so it's taken a bit of a back seat, sorry  hmm

I've set some things up, and I'm willing to host the block library for you. I'll have the ip for it set up soon (you'll have a seperate one to the rest of the server.) and I'll send you the details so you can have a play around and notify me of anything before commiting to use it.

I don't think hosting the site was the problem.

Yes, but my mysql works, would you like to use my mysql DB?

Last edited by rookwood101 (2012-03-08 10:40:35)


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

Offline

 

#2604 2012-03-10 12:21:15

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: ITopic: Welcome to your local block library!

My bounce block: (untested)
Made in Scramble

Code:

('bounce' #- #bnce)

Code:

bnce
"Made with Scramble by Hardmath123"

self turnRight: 180.

My repeat while block: (tested)
Inspired by the BYOB version
Made in Squeak

('repeat while %b' #c #doWhile)

Code in Scratch-Execution Engine/ScratchProcess/private-special forms

Code:

doWhile: t1
    | t2 t3 |
    t3 _ stackFrame expression.
    t2 _ stackFrame arguments.
    t2 size < 1 ifTrue: [^ self evaluateNextArgument].
    t2 first = t1 = false ifTrue: [^ self popStackFrame].
    self popStackFrameNoUnhightlight.
    self pushStackFrame: (ScratchStackFrame new expression: t3).
    self isAtomic ifFalse: [self pushStackFrame: (ScratchStackFrame new shouldYield: true)].
    self pushStackFrame: (ScratchStackFrame new expression: t3 firstBlockList)

More code in same location/Don't add this code if this was automatically created

Code:

doWhile
    ^ self doWhile: true

Last edited by rdococ (2012-03-10 13:30:48)

Offline

 

#2605 2012-03-10 14:52:17

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

Re: ITopic: Welcome to your local block library!

rdococ wrote:

My bounce block: (untested)
Made in Scramble

Code:

('bounce' #- #bnce)

Code:

bnce
"Made with Scramble by Hardmath123"

self turnRight: 180.

My repeat while block: (tested)
Inspired by the BYOB version
Made in Squeak

('repeat while %b' #c #doWhile)

Code in Scratch-Execution Engine/ScratchProcess/private-special forms

Code:

doWhile: t1
    | t2 t3 |
    t3 _ stackFrame expression.
    t2 _ stackFrame arguments.
    t2 size < 1 ifTrue: [^ self evaluateNextArgument].
    t2 first = t1 = false ifTrue: [^ self popStackFrame].
    self popStackFrameNoUnhightlight.
    self pushStackFrame: (ScratchStackFrame new expression: t3).
    self isAtomic ifFalse: [self pushStackFrame: (ScratchStackFrame new shouldYield: true)].
    self pushStackFrame: (ScratchStackFrame new expression: t3 firstBlockList)

More code in same location/Don't add this code if this was automatically created

Code:

doWhile
    ^ self doWhile: true

Check the library before posting... I posted the do while block already.  tongue

Also all you need is the blockspec...

As for bounce i don't know if that will be done.
I think ppl have tried to enter it... and i think it was either entered or it was tossed aside. (Norlly?)


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

 

#2606 2012-03-11 08:40:24

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Pecola1 wrote:

rdococ wrote:

My bounce block: (untested)
Made in Scramble

Code:

('bounce' #- #bnce)

Code:

bnce
"Made with Scramble by Hardmath123"

self turnRight: 180.

My repeat while block: (tested)
Inspired by the BYOB version
Made in Squeak

('repeat while %b' #c #doWhile)

Code in Scratch-Execution Engine/ScratchProcess/private-special forms

Code:

doWhile: t1
    | t2 t3 |
    t3 _ stackFrame expression.
    t2 _ stackFrame arguments.
    t2 size < 1 ifTrue: [^ self evaluateNextArgument].
    t2 first = t1 = false ifTrue: [^ self popStackFrame].
    self popStackFrameNoUnhightlight.
    self pushStackFrame: (ScratchStackFrame new expression: t3).
    self isAtomic ifFalse: [self pushStackFrame: (ScratchStackFrame new shouldYield: true)].
    self pushStackFrame: (ScratchStackFrame new expression: t3 firstBlockList)

More code in same location/Don't add this code if this was automatically created

Code:

doWhile
    ^ self doWhile: true

Check the library before posting... I posted the do while block already.  tongue

Also all you need is the blockspec...

As for bounce i don't know if that will be done.
I think ppl have tried to enter it... and i think it was either entered or it was tossed aside. (Norlly?)

Oops.  tongue

I'll try to make a C block sooner or later...

Offline

 

#2607 2012-03-11 08:52:05

funelephant
Scratcher
Registered: 2010-07-02
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Scratch Block  big_smile 
http://troll.ws/e17Pg7

Code:

saveImageForEndUser
    | t1 |
    t1 _ self ownerThatIsA: ScratchFrameMorph.
    t1 saveImageForEndUser

blockspec wrote:

('Save image for End User' #- #saveImageForEndUser)

This goes in control, its blue cuz It's from my mod

Last edited by funelephant (2012-03-11 08:54:39)


nicki begs to differ
http://24.media.tumblr.com/ab0e6e8fd347c5e39c2821bcab9d16e6/tumblr_mgu35sui1L1rfb7aqo2_500.gif

Offline

 

#2608 2012-03-17 12:10:32

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: ITopic: Welcome to your local block library!

I think there should be a

<mouse-pointer is touching colour [  ]?>

block.

Just a thought  smile

Last edited by RedRocker227 (2012-03-17 12:10:43)


Why

Offline

 

#2609 2012-03-17 16:07:10

ani888
New Scratcher
Registered: 2012-03-17
Posts: 4

Re: ITopic: Welcome to your local block library!

look at this block

warn [This script is simple!]
the block spec is
('warn %s' #- #warn:)
and the code is
warn: t1
DialogBoxMorph warn: t1.

Offline

 

#2610 2012-03-17 16:19:07

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

ani888 wrote:

look at this block

warn [This script is simple!]
the block spec is
('warn %s' #- #warn:)
and the code is
warn: t1
DialogBoxMorph warn: t1.

that block is already there.

Last edited by jslomba (2012-03-17 16:20:41)


the the the the the

Offline

 

#2611 2012-03-17 18:47:41

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

RedRocker227 wrote:

I think there should be a

<mouse-pointer is touching colour [  ]?>

block.

Just a thought  smile

Pretty simple in Panther.  A script that would do it would be this:

< (|color at x: ( ) y: ( )| as string) = ( |color here| as string) >

Last edited by Greenatic (2012-03-17 18:48:09)

Offline

 

#2612 2012-03-19 21:14:37

ke1235
Scratcher
Registered: 2010-03-07
Posts: 56

Re: ITopic: Welcome to your local block library!

http://dl.dropbox.com/u/28591467/letter%20%5B%5D%20as%20number.gif

blockspec wrote:

('letter %s as number' #r #letterasnum:)

Code:

letterasnum: t1 
    t1 = 'a' ifTrue: [^ '1'].
    t1 = 'b' ifTrue: [^ '2'].
    t1 = 'c' ifTrue: [^ '3'].
    t1 = 'd' ifTrue: [^ '4'].
    t1 = 'e' ifTrue: [^ '5'].
    t1 = 'f' ifTrue: [^ '6'].
    t1 = 'g' ifTrue: [^ '7'].
    t1 = 'h' ifTrue: [^ '8'].
    t1 = 'i' ifTrue: [^ '9'].
    t1 = 'j' ifTrue: [^ '10'].
    t1 = 'k' ifTrue: [^ '11'].
    t1 = 'l' ifTrue: [^ '12'].
    t1 = 'm' ifTrue: [^ '13'].
    t1 = 'n' ifTrue: [^ '14'].
    t1 = 'o' ifTrue: [^ '15'].
    t1 = 'p' ifTrue: [^ '16'].
    t1 = 'q' ifTrue: [^ '17'].
    t1 = 'r' ifTrue: [^ '18'].
    t1 = 's' ifTrue: [^ '19'].
    t1 = 't' ifTrue: [^ '20'].
    t1 = 'u' ifTrue: [^ '21'].
    t1 = 'v' ifTrue: [^ '22'].
    t1 = 'w' ifTrue: [^ '23'].
    t1 = 'x' ifTrue: [^ '24'].
    t1 = 'y' ifTrue: [^ '25'].
    t1 = 'z' ifTrue: [^ '26'].
    ^ self error

Based off of  Zorket's block,http://scratch.mit.edu/redirect/url?link=http://www.weebly.com/uploads/5/4/1/3/5413503/974316153.gif

Offline

 

#2613 2012-03-20 05:27:42

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: ITopic: Welcome to your local block library!

I have 3 panther blocks...
http://i.imgur.com/VFLZ9.gif
Name:

Code:

$number$ out of $number$ as %

Type:

Code:

 r

Code:

Code:

t1/t2*100

http://i.imgur.com/Szjrv.gif
This block is already in Panther, but you can't drag reporter blocks in a "$Keys$ slot". Although this could be achieved with <(key pressed) = []>.
Name:

Code:

key $String$ pressed?

Type:

Code:

b

Code:

Code:

self keyPressed: t1

http://i.imgur.com/UC9Ib.gif
I discovered this when dragging the (key pressed) block into the above block  tongue
Name:

Code:

any button pressed?

Type:

Code:

b

Code:

Code:

self keyPressed: self keyPressed

Last edited by Splodgey (2012-04-10 14:41:15)

Offline

 

#2614 2012-03-22 14:39:22

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Today, the block I'm going to make is recursive!

It calls itself with some inputs if the variable N is more than the variable varcheck, otherwise it reports the value variable.

Wait a minute! The images below there are messed up by Imageshack. It thinks the image is another image!

http://img841.imageshack.us/img841/4774/recursiveoverlabel.gif

http://img689.imageshack.us/img689/5568/recursiveover.gif
Hey! I got the correct image of the above block!

If you want to see the project, go on DropBox and join the shared folder 'Recursive Over' without single quotes.

Last edited by rdococ (2012-03-22 15:07:34)

Offline

 

#2615 2012-03-22 15:33:48

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

Re: ITopic: Welcome to your local block library!

Man I'm so sorry I've not been very active! I have four more pieces of coursework to hand in at uni between now and the 4th of April but I PROMISE that in the long easter holidays that follow I'll go through and do a proper update, Panther blocks and all!


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

Offline

 

#2616 2012-03-22 15:44:32

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

finally  smile

Offline

 

#2617 2012-03-23 17:24:38

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: ITopic: Welcome to your local block library!

rdococ wrote:

Today, the block I'm going to make is recursive!

It calls itself with some inputs if the variable N is more than the variable varcheck, otherwise it reports the value variable.

Wait a minute! The images below there are messed up by Imageshack. It thinks the image is another image!

http://img841.imageshack.us/img841/4774 … rlabel.gif

http://img689.imageshack.us/img689/5568 … veover.gif
Hey! I got the correct image of the above block!

If you want to see the project, go on DropBox and join the shared folder 'Recursive Over' without single quotes.

Ah, thanks. Don't have time to try that right now...

Offline

 

#2618 2012-03-24 06:20:57

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

block spec:

Code:

('replace all %s with %s in %s' #r #replaceAll:with:in:'bl' 'h' 'blue')

code: ScriptableScratchMorph

Code:

replaceAll: t1 with: t2 in: t3
    ^ t3 asString copyReplaceAll: t1 with: t2

By Dreamod.
This block replaces all of a string with another string in a string.

Offline

 

#2619 2012-03-24 17:16:45

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Hey Localblocklib. I am going to be creating a post next week called The Scratch University. In my post I was going to show a successful post that someone created. Would you mind if I used your thread and showed a few blocks.

Thanks
-joletole

Offline

 

#2620 2012-03-24 18:13:27

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

Re: ITopic: Welcome to your local block library!

Do you mean a successful thread then? And yes, go for it, send us a link!  smile


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

Offline

 

#2621 2012-03-24 18:57:12

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

Do you mean a successful thread then? And yes, go for it, send us a link!  smile

Thanks!

And each of the blocks I use, I will give credit to the person who made that block.

Offline

 

#2622 2012-03-25 18:23:27

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: ITopic: Welcome to your local block library!

Shared by SSSS
Blockspec:

    ('Import theme %s') #- #themepacks:)

Code:

    themepacks: t1
        ScratchFrameMorph readSkinFrom: (FileDirectory default directoryNamed: t1)

What this block does:
You download the ScratchSkin, edit it, then you can use this block to import the skin during a project.




THIS DOES NOT WORK!!!

Last edited by Squawkers13 (2012-03-25 18:23:46)


http://pekkit.net/banners/pekkit.png

Offline

 

#2623 2012-03-26 17:04:58

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Also, one more thing. I want to add a block. I am still confused on how to make the block, so could you change it so it looks like a sound block. Here is the block:

stop sound [meow v] for (1) sec
What this block does:
It stops the sound for 1 seconds. Then, after the 1 second, starts playing the song again.

Scratch Blocks

Last edited by joletole (2012-03-26 17:09:24)

Offline

 

#2624 2012-03-26 17:10:48

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

joletole wrote:

Also, one more thing. I want to add a block. I am still confused on how to make the block, so could you change it so it looks like a sound block. Here is the block:

stop sound [meow v] for (1) sec
What this block does:
It stops the sound for 1 seconds. Then, after the 1 second, starts playing the song again.

Do you have code for it?  Or are you requesting it?  (Also, making it pink like a sound block requires images.) 

If you want us to code it:  when it starts playing again, should it restart or pick up where it left off?

Offline

 

#2625 2012-03-26 17:14:15

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

joletole wrote:

Also, one more thing. I want to add a block. I am still confused on how to make the block, so could you change it so it looks like a sound block. Here is the block:

stop sound [meow v] for (1) sec
What this block does:
It stops the sound for 1 seconds. Then, after the 1 second, starts playing the song again.

Do you have code for it?  Or are you requesting it?  (Also, making it pink like a sound block requires images.) 

If you want us to code it:  when it starts playing again, should it restart or pick up where it left off?

Could you code it, I am very bad at coding.  And it would pick up where it left off.

Offline

 

Board footer