Recently there has been alot of talk of new blocks.
In this topic, I just want a list of the code for the new blocks and the name of them.
Ill start.
Name of block: Take Picture From Camera
Block Code:
('take photo' #- #takePhoto)
Other Notes:
NO OTHER NOTESName of block: Clone Current Sprite
Block Code:
('clone this sprite' #- #duplicateNoAttach)
Other Notes:
Does not work in presentation mode.Name of block: Delete Current Sprite
Block Code:
('delete this sprite' #- #undoableDeleteSprite)
Other Notes:
Does not work in presentation mode.Name of Block: Paint Costume
Thanks to: MathsWizz
Block Code:
('paint costume' #- #drawNewCostume)
Other Notes:
NO OTHER NOTESName of Block: Any Key Pressed
Thanks to: nXIII
Block Code:
('key pressed' #r #keyPressed)
Instance:
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.
Other Notes:
NO OTHER NOTESName of Block: Enter Presentation Mode
Thanks to: nXIII
Block Code:
('enter presentation mode' #- #enterPresMode)
Instance:
enterPresMode
|t1|
t1 := self ownerThatIsA: ScratchFrameMorph.
t1 enterPresentationMode
Other Notes:
NO OTHER NOTESName of Block: Open URL
Thanks to: billyedward
Block Code:
('Open a browser with URL%s' #- #openWebBrowserOn: 'http://www.')
Instance:
openWebBrowserOn: t1
Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]
Other Notes:
NO OTHER NOTES Name of Block: Hidden?
Thanks to: TheGameMaster
Block Code:
('hidden?' #b #isHidden)
Other Notes:
NO OTHER NOTES Name of Block: Point Towards X Y
Thanks to: TheGameMaster
Block Code:
('point to x:%n y:%n' #- #pointToX:y: 10 10)
Other Notes:
NO OTHER NOTESName of Block: Record Sound
Thanks to: GirWaffles64
Block Code:
('record sound' #- #recordSound)
Other Notes:
NO OTHER NOTESName of Block: Attach to Sprite
Thanks to: electrified123
Block Code:
('attach%m' #- #attachSprite:)
Instance:
attachSprite: t1
self addMorph: t1
Other Notes:
NO OTHER NOTESName of Block: Detach
Thanks to: NXIII
Block Code:
('detach %m' #- #detachMe)
Instance:
detachMe
| par |
par _ self owner owner.
(self owner isKindOf: ScratchStageMorph) ifTrue: [^ self].
self delete.
par addMorph: self.
Other Notes:
NO OTHER NOTESName of Block: Error
Thanks to: meew0
Block Code:
('error with message %s' #- #errorMessage: 'an error')
Instance:
errorMessage: t1
self error: t1
Other Notes:
Works only if error catching is off!Name of Block: join [] with [] and [] and []
Thanks to: meew0
Block Code:
('join %s with %s and %s and %s' #r #concatenate:with:and:and: '' '' '' '')
Instance:
concatenate: t1 with: t2 and: t3 and: t4
| t5 t6 |
t5 _ t1 asString , t2 asString.
t6 _ t3 asString , t4 asString.
^ t5 asString asUTF8 , t6 asString asUTF8
Other Notes:
NO OTHER NOTESName of Block: enable programmer facilities
Thanks to: Zorbak42
Block Code:
('enable programmer facilities' #- #enableProgrammerFacilities)
Instance:
enableProgrammerFacilities
Preferences enableProgrammerFacilities
Other Notes:
Let's you middle click/alt click on things in Scratch and get theName of Block: save image and close Scratch
Thanks to: Zorbak42
Block Code:
('save image and close Scratch' #- #saveImage)
Instance:
saveImage
ScratchFrameMorph new openInWorld; saveImageForEndUser
Other Notes:
Saves the Scratch.image and closes Scratch.Last edited by johnnydean1 (2010-05-03 07:25:30)
Offline
as these blocks will all be avaliable in http://pantherprogramming.weebly.com Panther, people can just wait a few days for it's release.
Last edited by sparks (2010-04-09 12:30:48)
Offline
Hmmm, I wonder if you would show the result of the take photo block in a costume... If not, then it's useless.
Offline
Offline
I Knew About The Clone Sprite And Delete Sprite Blocks, But I Had No Idea You Could Do A Take Picture Block! And If You Take A Picture, Your Picture Is Automaticly The Costume! But It Stops All The Scripts, So It's Pretty Much Useless.
Offline
What is the new costume message? a.k.a. ('new costume' #- #paintCostume) or something like that.
Offline
Add My <hidden?> Block And My point to x: () y: () Blocks. You Can Find Them In My Block Tutorial Projects.
Offline
by: electrified123
SPRITE MORPH ONLY code: attachSprite: t1
self addMorph: t1
blockspec: ('attach%m' #- #attachSprite:)
makes the sprite attach to the selected sprite , i am working on an unattach from sprite block but i havent figured it out yet
check out my stuff ~ If You Really Thought i would think what you thought, than you must think i think what you thought i would think at the time you thought i was thinking what you thoughtOffline
electrified123 wrote:
by: electrified123
SPRITE MORPH ONLY code: attachSprite: t1
self addMorph: t1
blockspec: ('attach%m' #- #attachSprite:)
makes the sprite attach to the selected sprite , i am working on an unattach from sprite block but i havent figured it out yet
I've done detachMe.
detachMe
| par |
par _ self owner owner.
(self owner isKindOf: ScratchStageMorph) ifTrue: [^ self].
self delete.
par addMorph: self.
Last edited by nXIII (2010-04-28 19:52:21)
Offline
I've done detachMe.
i tried it out but when you attach to another sprite that sprite dissappears in the detach menu
check out my stuff ~ If You Really Thought i would think what you thought, than you must think i think what you thought i would think at the time you thought i was thinking what you thoughtOffline
No you do not need a dropdown menu!
Offline
electrified123 wrote:
I've done detachMe.
i tried it out but when you attach to another sprite that sprite dissappears in the detach menu
do you mean the 'Attach' menu? If so, that should happen, because you can't attach a sprite to two sprites at once.
Offline
nXIII wrote:
electrified123 wrote:
I've done detachMe.
i tried it out but when you attach to another sprite that sprite dissappears in the detach menudo you mean the 'Attach' menu? If so, that should happen, because you can't attach a sprite to two sprites at once.
no the sprite you attach to disappears in the detach menu
check out my stuff ~ If You Really Thought i would think what you thought, than you must think i think what you thought i would think at the time you thought i was thinking what you thoughtOffline
You could add my first block:
Name of Block: join [] with [] and [] and []
Thanks to: meew0
Block Code:
('join %s with %s and %s and %s' #r #concatenate:with:and:and: '' '' '' '')
Instance:
concatenate: t1 with: t2 and: t3 and: t4
| t5 t6 |
t5 _ t1 asString , t2 asString.
t6 _ t3 asString , t4 asString.
^ t5 asString asUTF8 , t6 asString asUTF8
Other Notes:
NO OTHER NOTESOffline
meew0 wrote:
You could add my first block:
Code:
Name of Block: join [] with [] and [] and [] Thanks to: meew0 Block Code: ('join %s with %s and %s and %s' #r #concatenate:with:and:and: '' '' '' '') Instance: concatenate: t1 with: t2 and: t3 and: t4 | t5 t6 | t5 _ t1 asString , t2 asString. t6 _ t3 asString , t4 asString. ^ t5 asString asUTF8 , t6 asString asUTF8 Other Notes: NO OTHER NOTES
Whats the point when you can just keep pilling the other join blocks into each other?
Offline
Here's a few from me
Name of Block: enable programmer facilities
Thanks to: Zorbak42
Block Code:
('enable programmer facilities' #- #enableProgrammerFacilities)
Instance:
enableProgrammerFacilities
Preferences enableProgrammerFacilities
Other Notes:
Let's you middle click/alt click on things in Scratch and get the menu, duplicate, drag, delete, ect. buttons.and
Name of Block: save image and close Scratch
Thanks to: Zorbak42
Block Code:
('save image and close Scratch' #- #saveImage)
Instance:
saveImage
ScratchFrameMorph new openInWorld; saveImageForEndUser
Other Notes:
Saves the Scratch.image and closes Scratch.Last edited by Zorbak42 (2010-05-02 20:07:19)
Offline