sparks wrote:
GP1 wrote:
I wonder if there is a way to make this block for panther.
http://i54.tinypic.com/x3za02.gif
These would be handy for a game that you actually move around inI can't see that working as block, I've just spent a lot of time working on object recognition/following using the colour blocks and the webcam. I have a lot of code and not much progress to show for it, so I can't see it becoming a block
@PF, You are really excited about that vacation, huh?
okay then. I was just wondering. I still want something like that block to make a game that YOU move around in a camera and it turns it into an interactive thingy
Offline
Hey, I do the same thing! I couldn't even recognize nXIII's posts for a little while unti, I got used to the new one...
Mixed sig day threw me terribly.
Offline
sparks wrote:
Sorry, I usually identify people by their sigs, so your sig swap seriously confuses me!
PF changed his.
Offline
scimonster wrote:
Hey, I do the same thing! I couldn't even recognize nXIII's posts for a little while unti, I got used to the new one...
Mixed sig day threw me terribly.
LOL, think about what you new sig did to me. XD I was like now who is that, they must be new, *looks at users name* or not.... LOL I like people who have their name in their sig, like pf, gpg, et cetera.
Last edited by Pecola1 (2011-07-12 13:12:25)
Offline
I need serious advertising right now.
Click on my project!!!!!!!!
[/spammer ]
When my test account gets Scratcher status I'll put a banner with my name on.
Offline
Pecola1 wrote:
TuragaTreeko wrote:
Pecola1 wrote:
I remember being desperate and trying that. It never worked whatever I did till i found the compiler.
I found the code eventually for the block you are trying to make, want me to tell it to you?Oh, YES! . Please?
Uh oh... sorry, I am on vacation now, but I believe Slash has the block. Look at the code and see what it is, I will check later.
Slash has indeed got that block. I hit edit elements to see the code. I didn't understand it. I think slash uses a different syntax.
Offline
sparks wrote:
Block request!
http://scratch.mit.edu/redirect/url?lin … erageu.gif
Requested for: Panther.
(added to requests)
I think I made this in my OLD panther projects (where I experimented with the camera)
Offline
Yay! I was making this block for Rocket, and felt it should be shared. It detects if the sprite is draggable or not. This is also the first block that I've made myself fully
Block Specs:
('draggable' #r #draggable)
NO CODE
I put it under 'motion' category
Last edited by ssss (2011-07-14 02:20:10)
Offline
poemon1 wrote:
easy error reporter
Code:
('error' #r #errorReporter)and
Code:
errorReporter ^'ERROR!'
1) You should have shared this on the Library thread.
2) The code should be
errorReporter ^ self error
Offline
Thanks sparks for the ORIGINAL LIBRARY!
Just in case people want to see what it used to be like...
Please note: I kept the Sparks's EXACT quote from here, only changing URL tags to IMG tags.
I'm assuming you had smilies disabled there...
sparks wrote:
Welcome to your block library! One of the most important and beloved features of Scratch are the blocks, and a great deal of time and effort has gone into making the blocks you see. When building Scratch, the team specifically designed the code so that it would be as easy as possible to add new blocks, and many people have done just that!
This topic aims to bring together a collection of useful block code for experimenting Scratchers to try out and learn from, embracing the program and share parts of the Scratch Motto and hopefully letting users use what they learn here to imagine their own blocks!
This library currently deals with three types of block, and they are displayed under separate headings with explanations or explanatory links to avoid confusion. The three types are
Scratch Block
These blocks can be added directly into scratch.
BYOB Blocks
Built in the popular version of Scratch, BYOB blocks are composed of many other blocks and the code for these will probably be displayed as a block image.
Panther Blocks
Another popular version of Scratch, Panther has a "make a block" feature that lets users easily write block code to do pretty much anything.
So to all you curious Scratchers and viewers alike, I bid you welcome. Welcome to the Library!
===============================================================================
===============================================================================
How to add one of these blocks to Scratch:
I suggest visiting this excellent forum page. It has a full explanation from Billyedward. You can also look at this detailed explaination on the layout of blockspecs by ScratchReallyRocks
_______________________________________________________________________________
Control
"Record sound" block Shared by Sparks
type:
blockspec:Code:
'record sound' #- #recordSoundno code needed
What it does:
Opens the sound recording window and lets you record a sound.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"open camera window" block Shared by Sparks
type:
blockspec:Code:
'open camera window' #- #takePhotono code needed
What it does:
Opens the webcam control window and lets you take photos.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"save project as..." block Shared by Billybob-Mario
type:
blockspec:Code:
'save project' #- #saveProjcode:
Code:
saveProj | t1 | t1 _ self ownerThatIsA: ScratchFrameMorph. t1 saveScratchProjectWhat it does:
opens the save project as dialog and lets you save it!
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Pen
"pen size" block Shared by jonathanpb
type:
blockspec:Code:
'pen size' #r #penSizeno code needed
What it does:
Reports the current pen size.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"pen down?" block Shared by zorket
type:
blockspec:Code:
'pen down?' #b #penDownno code needed
What it does:
Reports wether the pen for that sprite is down or not.
===============================================================================
===============================================================================
how to add one of these blocks:
You need to download BYOB (Build Your Own Blocks) from this link to use the blocks shared in this section. A really helpful guide to understanding how to build your block can be found at this forum thread
To save space on this thread, any BYOB blocks shared will be displayed as links to images, rather than embedding the images to this thread directly. Just read the block description and click the link to the image if you want it.
_______________________________________________________________________________
Motion
[go to random X Y position] By jonathanpb
[turn clockwise( )° in ( ) secs] By PlayWithFire
Looks
[previous costume] By jonathanpb
[change costume by (n)]By jonathanpb
[switch to random costume]By jonathanpb
[animate costumes( ) through( ) with ( ) secs delay] By PlayWithFire
[go forward ( ) layers] By PlayWithFire
Operators
(pi) By PlayWithFire
(( )^( )) (to power) By PlayWithFire
<[]=[]> By meowmeow55Note, unlike the normal equals boolean, this one is case sensitive!
Pen
[stamp at X:( ) Y:( )] By PlayWithFire
Sensing
<clicked?> By PlayWithFire
<mouse touching edge?> By PlayWithFire
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
================================================================================
================================================================================
How to add one of these blocks:
To use the Panther coded blocks, you need to download Panther from this link.
To add a block code, you need to open Panther, go to the variables tab, scroll down and click the "make a block" button at the bottom. You will get a popup window with three text boxes and a colour square. The long thin one at the top needs to have the block name in it. The square one to the right with a "-" in it defines the type of block (reporter, stack etc.) and the large one below them is for the block code.
________________________________________________________________________________
Control
"Record sound" Block shared by: Sparks
box 1:
Record sound
box 2
-
box 3
self recordSound
What this block does:
this block opens the sound recorder and lets you record sound.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"open camera window" Block shared by: Sparks
box 1:
open camera window
box 2
-
box 3
self takePhoto
What this block does:
this block opens the camera window and lets you take photos.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"open webpage with URL [http://]" Block shared by: Billyedward
box 1:
open browser with URL $String$
box 2
-
box 3
Cursor wait showWhile:[ScratchPlugin primOpenURL: t1]
What this block does:
this block opens your default web browser with the webpage typed into the box if the browser is already open, it will open the page in a new tab on firefox, a new window in internet explorer).
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"clone me" Block shared by: Unknown
box 1:
clone me
box 2
-
box 3
self duplicateNoAttach
What this block does:
This block creates a clone of the sprite that runs it. Unlike the standard clone blocks in Panther, this one creates a clone that does not dissapear once the stop button is pressed. If you want the clone to appear at the mouse pointer and let you place it, just don't put the NoAttach part into the CYOB window. note, does not work in presentation mode.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"permenantly delete me" Block shared by: Unknown
box 1:
permenantly delete me
box 2
-
box 3
self undoableDeleteSprite
What this block does:
This block permenantly deletes the sprite that runs it. Unlike the standard delete block in Panther, this block can delete originial (not a clone) sprites so use it with care. note, does not work in presentation mode.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"save project as..." Block shared by: Billybob-Mario
box 1:
save project as...
box 2
-
box 3
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 saveScratchProject
What this block does:
This block opens the save window and prompts you to save the project.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Variables
"set background watcher colour of [ ] to [ ]" Block shared by: Unknown
box 1:
permenantly delete me
box 2
-
box 3
"permenantly delete me" Block shared by: nXIII
box 1:
set bg of $Variable$ to $Color$
box 2
-
box 3
| s frame w b palette |
s _ self.
(self varNames includes: t1) ifFalse: [(s _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ self]].
(s varNames includes: t1) ifFalse: [^ self].
frame _ self ownerThatIsA: ScratchFrameMorph.
frame ifNil: [
(w _ self ownerThatIsA: OffscreenWorldMorph) ifNil: [^ self].
frame _ w frame].
What this block does:
This block permenantly deletes the sprite that runs it. Unlike the standard delete block in Panther, this block can delete originial (not a clone) sprites so use it with care. note, does not work in presentation mode.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Operators
"[] contains []?" Block shared by: nXIII
box 1:
$String$ contains $String$?
box 2
b
box 3
^ t1 includesSubString: t2
What this block does:
This block tells you wether the text in the first box contains the text in the second. Excellent for searching for keywords in an input answer.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Want to add to the library? Please do! comment below for it to be added above.
Wow. So underdeveloped! I like the new logo, but it's VERY interesting to see the old.
If I could correct spelling/grammar there...
Offline
Thanks, Sci, it's really odd to see that old layout again, the Library has come so far in a year! I actually saw this or one very similar on stickdude123's post in the OLD block library. I was digging through for the new "about" page's history
Offline
ssss wrote:
Yay! I was making this block for Rocket, and felt it should be shared. It detects if the sprite is draggable or not. This is also the first block that I've made myself fully
Block Specs:
('draggable' #r #draggable)NO CODE
I put it under 'motion' category
Offline
sparks wrote:
There's no need to post more than once, ssss, we'll add it at some point!
... Thanks ...
Just was so happy I made something that wasn't made before, or at least put in the block library..
Offline
scimonster wrote:
1) You should have shared this on the Library thread.
Isn't this the Library Thread?
Offline
sparks wrote:
Thanks, Sci, it's really odd to see that old layout again, the Library has come so far in a year! I actually saw this or one very similar on stickdude123's post in the OLD block library. I was digging through for the new "about" page's history
That's where I got it from. I quoted stickdude's quote, removed his text, and changed the url tags to images. ;P
SSBBM wrote:
scimonster wrote:
1) You should have shared this on the Library thread.
Isn't this the Library Thread?
AAAAAHH I MADE A MISTAKE!!!!!!! ^^
I thought it was on the site dev thread. ^^
Offline
Pecola1 wrote:
TuragaTreeko wrote:
Pecola1 wrote:
I remember being desperate and trying that. It never worked whatever I did till i found the compiler.
I found the code eventually for the block you are trying to make, want me to tell it to you?Oh, YES! . Please?
Uh oh... sorry, I am on vacation now, but I believe Slash has the block. Look at the code and see what it is, I will check later.
@Pecola1 Slash has some weird thing for the veiw code thing, and I don't understand any of it. Are you back yet? I would really love <3 the code for that. please.
Offline
scimonster wrote:
poemon1 wrote:
easy error reporter
Code:
('error' #r #errorReporter)and
Code:
errorReporter ^'ERROR!'1) You should have shared this on the Library thread.
2) The code should beCode:
errorReporter ^ self error
The code should be nothing. The selector can be #error, and it will work.
Offline
rubiks_cube_guy238 wrote:
scimonster wrote:
poemon1 wrote:
easy error reporter
Code:
('error' #r #errorReporter)and
Code:
errorReporter ^'ERROR!'1) You should have shared this on the Library thread.
2) The code should beCode:
errorReporter ^ self errorThe code should be nothing. The selector can be #error, and it will work.
*facepalm* why didn't I think of that?
Offline
scimonster wrote:
sparks wrote:
Thanks, Sci, it's really odd to see that old layout again, the Library has come so far in a year! I actually saw this or one very similar on stickdude123's post in the OLD block library. I was digging through for the new "about" page's history
That's where I got it from. I quoted stickdude's quote, removed his text, and changed the url tags to images. ;P
SSBBM wrote:
scimonster wrote:
1) You should have shared this on the Library thread.
Isn't this the Library Thread?
AAAAAHH I MADE A MISTAKE!!!!!!! ^^
I thought it was on the site dev thread. ^^
It was... It got moved.
Offline
Happy birthday block library!
Offline
Happy birthday!
Offline
Competition results are in!
In First place:
by RUMCHEERYPOOPOO! Congratulations! You've earned the honour of having your image as the title image of our library for an undisclosed amount of time!
In second place is Scimonster with
Third was SSBBM with his
and finally by Dinoclor!
Thanks very much to all those who entered and a very happy birthday to the library!
Last edited by sparks (2011-07-15 10:36:08)
Offline