ScratchReallyROCKS wrote:
LS97 wrote:
johnnydean1 wrote:
@LS97
Can you make a (pitch) block.
Like loundness, but for pitchno, i cant. pitch is not a simple value, it's hard to sense it.
but i think you can do something with the picoboard, not sure though.No, that's just loudness. A pitch block would be REALLY nice though.
I Agree. A Pitch Block Would Be Pretty Cool.
Offline
TheGameMaster1231 wrote:
ScratchReallyROCKS wrote:
LS97 wrote:
no, i cant. pitch is not a simple value, it's hard to sense it.
but i think you can do something with the picoboard, not sure though.No, that's just loudness. A pitch block would be REALLY nice though.
I Agree. A Pitch Block Would Be Pretty Cool.
How to win the game: Say, "I don't care about the game. It doesn't matter. I quit the game." Then, you win!
Offline
what the ___?
Offline
i mean billybob's post.
Offline
Billybob-Mario wrote:
TheGameMaster1231 wrote:
ScratchReallyROCKS wrote:
No, that's just loudness. A pitch block would be REALLY nice though.
I Agree. A Pitch Block Would Be Pretty Cool.
How to win the game: Say, "I don't care about the game. It doesn't matter. I quit the game." Then, you win!
That's a bit off-topic...
http://xkcd.com/391/
Last edited by nXIII (2010-06-15 13:51:41)
Offline
nXIII wrote:
Billybob-Mario wrote:
TheGameMaster1231 wrote:
I Agree. A Pitch Block Would Be Pretty Cool.How to win the game: Say, "I don't care about the game. It doesn't matter. I quit the game." Then, you win!
That's a bit off-topic...
http://xkcd.com/391/
Ya, I've Seen That Before. It's Pretty Funny.
Offline
LS97 wrote:
i mean billybob's post.
BillyBob Was Talking About My Signature. (See The Italic-Bold-Underlined Words? Good.)
Last edited by TheGameMaster1231 (2010-06-15 14:35:27)
Offline
I'm a newbie at this, but I want to learn it a little and play around with it. I don't know if this question has been answered in the 27 pages of this topic, but my words are in blue
LS97 wrote:
The 'Get time/date' block
Here we go!
The get time/date block reports the time, date, hour, etc. without the user having to insert it manually.
Okay. I am doing this to do a test to see if it actually works
Copy this line of code into a space between two blocks in the 'control' section of blockSpecs in ScriptableScratchMorph.Code:
('get %s' #r #getTime: 'date')I did, but then it asked for my initials. I typed my initials, and then it posted my initials and the date where I pasted this code.
Then go to the instance section, then to 'other ops' and replace the code of broadcast: with the followingCode:
getTime: t1 t1 = 'date' ifTrue: [^ Date today]. t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )]. t1 = 'time' ifTrue: [^ Time now]. t1 = 'seconds' ifTrue: [^ Time now seconds]. t1 = 'minutes' ifTrue: [^ Time now minutes]. t1 = 'hours' ifTrue: [^ Time now hours]. t1 = 'day' ifTrue: [^ Date today weekday]. t1 = 'help' ifTrue: [^ 'type date, short date, time, seconds, minutes, day, hours']. ^ 'Error!'then right-click and click accept. type your initials and you're ready to use the new block!
I don't know if I did all of it right, but I just don't know what to do next...
Thanks!
~coka
-----
@ Joeman592: Scratch 2.0 is supposed come out sometime in early to mid-2011
Last edited by coka (2010-06-15 14:50:59)
Offline
coka wrote:
I'm a newbie at this, but I want to learn it a little and play around with it. I don't know if this question has been answered in the 27 pages of this topic, but my words are in blue
LS97 wrote:
The 'Get time/date' block
http://www.freeimagehosting.net/uploads/209a5b329a.gif
Here we go!
The get time/date block reports the time, date, hour, etc. without the user having to insert it manually.
Okay. I am doing this to do a test to see if it actually works
Copy this line of code into a space between two blocks in the 'control' section of blockSpecs in ScriptableScratchMorph.Code:
('get %s' #r #getTime: 'date')I did, but then it asked for my initials. I typed my initials, and then it posted my initials and the date where I pasted this code.
Then go to the instance section, then to 'other ops' and replace the code of broadcast: with the followingCode:
getTime: t1 t1 = 'date' ifTrue: [^ Date today]. t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )]. t1 = 'time' ifTrue: [^ Time now]. t1 = 'seconds' ifTrue: [^ Time now seconds]. t1 = 'minutes' ifTrue: [^ Time now minutes]. t1 = 'hours' ifTrue: [^ Time now hours]. t1 = 'day' ifTrue: [^ Date today weekday]. t1 = 'help' ifTrue: [^ 'type date, short date, time, seconds, minutes, day, hours']. ^ 'Error!'then right-click and click accept. type your initials and you're ready to use the new block!
I don't know if I did all of it right, but I just don't know what to do next...
Thanks!
~coka
-----
@ Joeman592: Scratch 2.0 is supposed come out sometime in early to mid-2011
it is alt-v to paste, not ctrl-v
Offline
LS97 wrote:
Hey Scratchers!
Are you all wondering how to make your own blocks in Scratch using Squeak? Well then, you've come to the right place. This forum thread will include tutorials, links to other projects, and more to make blocks like this:
http://www.freeimagehosting.net/uploads/ef0a230720.gif
The blocks are pretty much self-explanatory, so no need for a list of what they do. i'll start with the block-making right away.
Note for the lazy people: this tutorial aims to teach people to work in Squeak, not only to get the new blocks. So do not ask for my image file.
First, we have to open the system browser. Here's a tutorial for it:
T - Open Browser
Now, we're ready to start programming. From the browser, go to:
>Scratch-Objects
>ScriptableScratchMorph
>Click onto Class
>Scratch (or) BlockSpecs
>blockSpecks
Here we've got the main bit of blocks. it all looks very messy, so you can use the find option if you want to save your eyes when looking for a block. Now let's take a block to analize: the yellow repeat(X) block.
http://www.freeimagehosting.net/uploads/fb29012635.png
See how i highlighted a bit? that's the code for that block.
The block coding structure is as follows:
('repeat %n' #c #doRepeat 10)
the block is identified by the two brackets (blue).
the block text is in between apostrophes (black).
the block type identifier or block arguments follow a # sign (red).
the command also follows a # sign (green).
the %n in the block is the input box, where the user can put the number. in fact, %n produces that round textbox where only numbers can be inserted. here's the full list:Code:
a: attribute of another sprite, such as X position or size. b: a boolean inserter c: a colour picker that shows the menu. C: a colour picker that doesn't d: the sprite direction menu/numerical inserter. D: the menu for midi drums e: The broadcast message menu f: math function menu (with sin, abs, etc.) g: menu for the different graphic effects. h: numerical sensor board selector menu H: boolean sensor board selector menu i: midi instrument menu/numerical inserter k: menu for the names of the different keys, used in the key sensor blocks. l: menu with the costume names of the given sprite. L: list name menu. m: sprite list n: numerical inserter N: note name menu/inserter s: string inserter S: sound selector menu v: variable labels menu y: menu used to delete either a number of the last value or all of a list.Credit to billyedward for this list.
the repeat block, having to 'host' other blocks in it, is C shaped. that's why the block argument (above in red) is a c.
Here's a brief list of the different arguments:Code:
#- no arguments (command block) #r Reporter block (the round ones) #b boolean block (diamond shaped) #c C shaped block (like the forever block) #t Time block (like wait X secs) #W 'when' hat block #S start button click hat block #K key-activated hat block There's many more types of hat blocks, but i won't include them all.but it's not all that simple! now that we've got the block in the block palette, we need to give it the code it needs to perform the action. for this you need to go to 'instance', then to the appropriate 'ops'. there, after creating a method, you can add the code you need.
________
Now that you know a bit about the structure, we can move on quickly to the actual new blocks you saw at the beginning. I'm not going to add them into this post, it would be too long. you'll find the different blocks in different posts.
I hope you'll enjoy your new blocks!
he is so right how can i do it its hard for me!
Offline
wei2912 wrote:
Can someone show me where to put the code of the link block? I can't find where to put it.
I'd put in in the 'other ops' section of 'ScriptableScratchMorph.'
Offline
ScratchReallyROCKS wrote:
wei2912 wrote:
Can someone show me where to put the code of the link block? I can't find where to put it.
I'd put in in the 'other ops' section of 'ScriptableScratchMorph.'
Thanks.
Offline
Joeman592 wrote:
any new blocks at all?
I'm sure LS97 will get around to that soon. I want more blocks too!
Offline
If you want any new blocks, you need to give me IDEAS for them!
Offline
Joeman592 wrote:
how about... a previous costume block?
no use. just do a
[blocks]<switch to costume[ (( <costume#> <-> 1 ))
Offline
no. it's easy to make in scratch!
Offline
I need help. My new (key pressed) block gets an error, and my <key [space] pressed> block works like my modblock was supposed to!
Can someone help me? I don't do Squeak.
Offline