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:
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:
lowercase: t1 ^ t1 asLowercase
there you go!
Offline
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:
report: t1 ^ t1
Offline
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
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.
Offline
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.
Offline
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.
Offline
whoa! quit those lols please
Offline
LS97 wrote:
thanks! btw can you plzz delete those posts?
Which ones?
Offline
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
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
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?
Offline
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
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?
Offline
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
Offline
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 { > }]) i just want to get better at squeak... im already ok tho...
Offline
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!
Offline
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)
Offline
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!!!!
Offline
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
changeCostumeIndexBy: t1 self costumeIndex: self costumeIndex + t1
in looks ops of ScriptableScratchMorph instance,
('change costume by %n' #- #changeCostumeIndexBy: 1)
in SpriteMorph blockSpecs, and
('change background by %n' #- #changeBackgroundIndexBy: 1)
in StageMorph blockSpecs. Hope it helps!
Offline