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

#101 2010-04-27 11:49:07

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

The string control blocks
these are requested blocks, so i'll get to it immidiately.
i can't really guarantee 'cause this is off the top of my head...

THE REVERSE BLOCK
add to blockSpecs under operators: ('reverse %s' #r #rev:)

add to code under string ops:

Code:

rev: t1
^ t1 reversed

THE LOWERCASE/UPPERCASE
please note that i put this once only (for lowercase). just change all the 'lower' to 'upper' for uppercase. (duh)

put in blockSpecs: ('%s lowercase' #r #lowercase:)

put in code under string ops:

Code:

lowercase: t1
^ t1 asLowercase

there you go!

Offline

 

#102 2010-04-27 11:49:30

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

Re: Cool custom blocks in Scratch

Sperry wrote:

LS97 wrote:

rocket101 wrote:

How do you make a (report __) block?

why would you want to make that?

Hmm.. I don't know, unless they wanted to report a boolean.

Idk... LOL! The code is:

Code:

report: t1
^ t1

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

Offline

 

#103 2010-04-27 11:50:09

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

Sperry wrote:

LS97 wrote:

rocket101 wrote:

How do you make a (report __) block?

why would you want to make that?

Hmm.. I don't know, unless they wanted to report a boolean.

well just put that in a join block!

Offline

 

#104 2010-04-27 11:52:57

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

Re: Cool custom blocks in Scratch

LS97 wrote:

Sperry wrote:

LS97 wrote:


why would you want to make that?

Hmm.. I don't know, unless they wanted to report a boolean.

well just put that in a join block!

That's true... It would look nicer if it was a whole new block though.


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

Offline

 

#105 2010-04-27 11:53:14

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Cool custom blocks in Scratch

LS97 wrote:

Sperry wrote:

LS97 wrote:


why would you want to make that?

Hmm.. I don't know, unless they wanted to report a boolean.

well just put that in a join block!

Yes, I suppose. A pretty pointless block then. Though (report <>) would look nicer.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#106 2010-04-27 11:53:50

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Cool custom blocks in Scratch

MathWizz wrote:

LS97 wrote:

Sperry wrote:


Hmm.. I don't know, unless they wanted to report a boolean.

well just put that in a join block!

That's true... It would look nicer if it was a whole new block though.

Yeah, true.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#107 2010-04-27 11:55:56

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

Re: Cool custom blocks in Scratch

MathWizz wrote:

That's true... It would look nicer if it was a whole new block though.

Sperry wrote:

Yes, I suppose. A pretty pointless block then. Though (report <>) would look nicer.

0_o LOL LOL LOL XD XD  yikes   tongue


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

Offline

 

#108 2010-04-27 12:13:42

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

whoa! quit those lols please

Offline

 

#109 2010-04-27 12:24:55

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Cool custom blocks in Scratch

Whoops, I'm sorry, I did that on the spur of the moment.

Good luck on your mod I see you are making!


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#110 2010-04-27 12:26:57

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Cool custom blocks in Scratch

LS97 wrote:

thanks! btw can you plzz delete those posts?

Which ones?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#111 2010-04-27 12:31:26

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Cool custom blocks in Scratch

I deleted my 'lol' post.

Oh, and what new blocks do you currently have in Bingo?


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#112 2010-04-27 12:34:47

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

currently i added all the blocks on the first post, and mesh blocks, and sprite touching sprite block, a show tooltip %s block, and some other minor sutff. plus i added the categories: files, world, mesh. the world one has stuff like dialogs, date, time, check connection, record sound, take pic, etc.

Offline

 

#113 2010-04-27 21:14:07

randalpik
Scratcher
Registered: 2008-07-27
Posts: 82

Re: Cool custom blocks in Scratch

Hmm... do any of you know how to add a new category to the top left pane, like motion or control?


My stuff: http://scratch.mit.edu/users/randalpik
Your face: Look at a gopher

Offline

 

#114 2010-04-27 21:35:19

randalpik
Scratcher
Registered: 2008-07-27
Posts: 82

Re: Cool custom blocks in Scratch

How do you take out the checkbox thingy in front of all boolean and reporter blocks that you create?


My stuff: http://scratch.mit.edu/users/randalpik
Your face: Look at a gopher

Offline

 

#115 2010-04-28 11:25:14

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

randalpik wrote:

Hmm... do any of you know how to add a new category to the top left pane, like motion or control?

easy. first take out some script in Squeak which automatically fixes it to the current layout, then alt-click buttons and click duplicate. then change the string and the arguments to the new block category.

Offline

 

#116 2010-04-28 11:34:15

randalpik
Scratcher
Registered: 2008-07-27
Posts: 82

Re: Cool custom blocks in Scratch

LS97 wrote:

randalpik wrote:

Hmm... do any of you know how to add a new category to the top left pane, like motion or control?

easy. first take out some script in Squeak which automatically fixes it to the current layout, then alt-click buttons and click duplicate. then change the string and the arguments to the new block category.

But where is the script?


My stuff: http://scratch.mit.edu/users/randalpik
Your face: Look at a gopher

Offline

 

#117 2010-04-28 13:52:26

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

randalpik wrote:

LS97 wrote:

randalpik wrote:

Hmm... do any of you know how to add a new category to the top left pane, like motion or control?

easy. first take out some script in Squeak which automatically fixes it to the current layout, then alt-click buttons and click duplicate. then change the string and the arguments to the new block category.

But where is the script?

aaargh! i **** hate my internet connection!!!!!! i have to REPOST!!! I AM MAD AT IT!!! ARGHHHH!!!!!

GO TO: scratch-ui-panes > viewermorph > initialization > rebuildcategories

delete it and click 'delete, then browse senders'. in the senders delete the section of code referred to the rebuildcategories.

note: to add blocks to yur new category, just add the name in quotes somewhere in the blockSpecs, then under the scratchMorph blockSpecs go to blockSpecsColor or something like that and add your desired color (unless you want red then it's automatic).

haha i copied the text now even if it disconnects...

Last edited by LS97 (2010-04-28 13:52:47)

Offline

 

#118 2010-04-28 19:14:32

poppypaynterscratch
Scratcher
Registered: 2009-09-20
Posts: 100+

Re: Cool custom blocks in Scratch

could i join bingo? im *sortof* working on a personal mod.... but i'd rather trash it and work on bingo... im (obviously) familiar with the browser and such... so, could i hepl work on it?


http://i33.tinypic.com/2dw6hxv.gif

Offline

 

#119 2010-04-28 19:24:36

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

Re: Cool custom blocks in Scratch

poppypaynterscratch wrote:

could i join bingo? im *sortof* working on a personal mod.... but i'd rather trash it and work on bingo... im (obviously) familiar with the browser and such... so, could i hepl work on it?

Don't steal from Panther


nXIII

Offline

 

#120 2010-04-28 19:41:38

roger-
Scratcher
Registered: 2010-02-13
Posts: 100+

Re: Cool custom blocks in Scratch

here's a good exponent block. put it under operators.

Code:

exp: t1 raisedTo: t2 
    | t3 |
    t3 _ t1 raisedTo: t2.
    ^ t3

Food is Fat. Fat is power.
        I am almighty.

Offline

 

#121 2010-04-28 20:53:37

poppypaynterscratch
Scratcher
Registered: 2009-09-20
Posts: 100+

Re: Cool custom blocks in Scratch

nXIII wrote:

poppypaynterscratch wrote:

could i join bingo? im *sortof* working on a personal mod.... but i'd rather trash it and work on bingo... im (obviously) familiar with the browser and such... so, could i help work on it?

Don't steal from Panther

.... why would i? i have no  need for your silly BLOCKS! (jk panther is awesome [ but im not a thief { > sad   }]) i just want to get better at squeak... im already ok tho...


http://i33.tinypic.com/2dw6hxv.gif

Offline

 

#122 2010-04-28 21:38:28

randalpik
Scratcher
Registered: 2008-07-27
Posts: 82

Re: Cool custom blocks in Scratch

LS97 wrote:

randalpik wrote:

LS97 wrote:


easy. first take out some script in Squeak which automatically fixes it to the current layout, then alt-click buttons and click duplicate. then change the string and the arguments to the new block category.

But where is the script?

aaargh! i **** hate my internet connection!!!!!! i have to REPOST!!! I AM MAD AT IT!!! ARGHHHH!!!!!

GO TO: scratch-ui-panes > viewermorph > initialization > rebuildcategories

delete it and click 'delete, then browse senders'. in the senders delete the section of code referred to the rebuildcategories.

note: to add blocks to yur new category, just add the name in quotes somewhere in the blockSpecs, then under the scratchMorph blockSpecs go to blockSpecsColor or something like that and add your desired color (unless you want red then it's automatic).

haha i copied the text now even if it disconnects...

Thanks much!


My stuff: http://scratch.mit.edu/users/randalpik
Your face: Look at a gopher

Offline

 

#123 2010-04-28 23:47:58

Joeman592
Scratcher
Registered: 2010-01-23
Posts: 100+

Re: Cool custom blocks in Scratch

roger- wrote:

here's a good exponent block. put it under operators.

Code:

exp: t1 raisedTo: t2 
    | t3 |
    t3 _ t1 raisedTo: t2.
    ^ t3

But there isn't an operators... and if there is PLEASE TELL ME CUZ I CANT FIND IT! please? Also, please tell me if it goes in string.

Last edited by Joeman592 (2010-04-28 23:59:17)


http://i.imgur.com/HcAj1.png
http://i.imgur.com/gss7S.gifhttp://i.imgur.com/kbcKt.gifhttp://i.imgur.com/0LteM.gif

Offline

 

#124 2010-04-29 00:17:22

Joeman592
Scratcher
Registered: 2010-01-23
Posts: 100+

Re: Cool custom blocks in Scratch

Im making my own scratch-based project, and i need some blocks. could you please give me te codes for a <I recieve[^]> conrtrol booolean, a bounce, if touching [^], bounce motion blocks, Think nothing and change costume # by () look blocks, and if you can do thats THANK YOU SOOOOOO MUCH!!!!


http://i.imgur.com/HcAj1.png
http://i.imgur.com/gss7S.gifhttp://i.imgur.com/kbcKt.gifhttp://i.imgur.com/0LteM.gif

Offline

 

#125 2010-04-29 07:43:47

Zorbak42
Scratcher
Registered: 2009-01-27
Posts: 100+

Re: Cool custom blocks in Scratch

Joeman592 wrote:

Im making my own scratch-based project, and i need some blocks. could you please give me te codes for a <I recieve[^]> conrtrol booolean, a bounce, if touching [^], bounce motion blocks, Think nothing and change costume # by () look blocks, and if you can do thats THANK YOU SOOOOOO MUCH!!!!

I can give you code for change costume # by (). Put

Code:

changeCostumeIndexBy: t1 
    self costumeIndex: self costumeIndex + t1

in looks ops of ScriptableScratchMorph instance,

Code:

('change costume by %n' #- #changeCostumeIndexBy: 1)

in SpriteMorph blockSpecs, and

Code:

('change background by %n' #- #changeBackgroundIndexBy: 1)

in StageMorph blockSpecs. Hope it helps!  smile

Offline

 

Board footer