sparks wrote:
ysp is the file name of a BYOB sprite! You get it by right-clicking on a BYOB block sprite and choosing "Export this sprite" and there are some beginning to appear in the BYOB section of this library so you can download a sprite containing the requested block.
Ok! Sounds easy! I did the list block, even my new one. Right now I'm doing operators.
Edit: A BYOB project would work just as good, right? I'm having torble exporting sprites.
Last edited by SSBBM (2010-12-12 14:08:10)
Offline
Cool! Remember you need to email them to meowmeow55, and try and keep them all the same as the sample one I posted.
er, I think people would much perfer sprites, you can import them into a project much easier than another project
Last edited by sparks (2010-12-12 14:15:53)
Offline
Yeah, but is opens in a project. To import the block you would save the project then import the project. Or export the sprite in the project and import it that way. I don't really see the difference in opening a project vs sprite.
Offline
sparks wrote:
I suppose not...
did you notice that one of the motion blocks in the BYOB project is credited to "floppy_gunk"?? I don't think that's right...
No I didn't
Your link to the BYOB website doesn't work btw.
Offline
Sparks, what I am saying is that the matters in what you write in your posts actually tell me your not going to add that one. Here's the one you turned your head to:
zorket wrote:
blockspec:
'open user page' #- #openUserPage
Code:
openUserPage | t1 | t1 StringDialog askWithCancel: 'user name:'. t1 size = 0 ifTrue: [^ self]. Cursor wait showWhile: [ScratchPlugin primOpenURL: 'http://scratch.mit.edu/users/', t1]
But I am being patient at the moment as you speak!
Offline
@Sparks:Can you add my blocks from page 25 (i believe may be 24) I know you are busy making all those download links but I think the blocks are more important.
Offline
zorket wrote:
sparks wrote:
neat! Share it!
Oh my gosh.
(note to self: how do I get sparks to add my blocks? I'm gonna have to plan.) DO NOT highlight note to self.
operators
( (5) (+) (5) )
blockspec:('%s %s %s' #r #pleaseAdd:with:to:)
Code:
pleaseAdd: t1 with: t1 to: t3 t2 = '+' ifTrue: [^ t1 + t3]. t2 = '-' ifTrue: [^ t1 - t3]. t2 = '*' ifTrue: [^ t1 * t3]. t2 = '/' ifTrue: [^t1 / t3]. ^ error!addThisBlock
| t1 |
t1 _ askInDialog: 'sparks, will you add this block for me?'.
t1 response = 'yes' ifTrue: [^ happyness].
t1 response = 'no' ifTrue: [^ go insane].
watcherMorphWatchBlockAdder
It would be better to make the
('%s %s %s' #r #pleaseAdd:with:to:)
be only number inserts like this:
('%n %s %n' #r #pleaseAdd:with:to:)
The middle is still string so you can insert * / - +. also add the
(( ) ^ ( ))
block to it too.
The Code ^ t1 raisedTo: t2
also you made a mistake the code should be:
pleaseAdd: t1 with: t2 to: t3 t2 = '+' ifTrue: [^ t1 + t3]. t2 = '-' ifTrue: [^ t1 - t3]. t2 = '*' ifTrue: [^ t1 * t3]. t2 = '/' ifTrue: [^t1 / t3]. ^ error!
not
pleaseAdd: t1 with: t1 to: t3 t2 = '+' ifTrue: [^ t1 + t3]. t2 = '-' ifTrue: [^ t1 - t3]. t2 = '*' ifTrue: [^ t1 * t3]. t2 = '/' ifTrue: [^t1 / t3]. ^ error!
(the second t1 in the pleaseAdd: t1 with: t1 to: t3 should be changed to t2)
Offline
owetre18 wrote:
I need a little help with making scratch blocks. Where do you put the code? I have searched, but I can't figure it out. I know how to put the block there, but it doesn't do anything. Please help.
Off-topic: my 60th post!
did anyone see this? after I posted, there was a long string of comments.
Offline
sparks wrote:
... I'm pretty sure that zorket wasn't trying to make a working block there...
Well It works and it is good. I think scratch should have made that instead of:
(( <+> ))
(( <-> ))
(( <*> ))
(( </> ))
Offline
SSBBM, I know his email, but I can't post it here, and I can't give it to you without his permission... you'll have to ask him to message you to post his email on a project of yours somewhere so that you cansend them!
Offline
sparks wrote:
SSBBM, I know his email, but I can't post it here, and I can't give it to you without his permission... you'll have to ask him to message you to post his email on a project of yours somewhere so that you cansend them!
Right. Well, I'll just give him my email (I don't mind giving out my email here) and he can email me, then I'll have his email and give him the blocks.
Man, this is getting complicated.
Offline
owetre18 wrote:
owetre18 wrote:
I need a little help with making scratch blocks. Where do you put the code? I have searched, but I can't figure it out. I know how to put the block there, but it doesn't do anything. Please help.
Off-topic: my 60th post!did anyone see this? after I posted, there was a long string of comments.
Sorry. I did see it but I was busy and forgot. First shift click the R in Scratch on the offline mode.
Then select turn fill screen mode off. A white spot will appear and you left click on it to open the world menu.
Click open. Click browser.
The system browser will open.
To make a block: in the first pane click Scratch Objects. Next you will chose according to what you are making the block for. (stage, sprite,or both) If you want both click ScriptableScratchMorph. If you want only a sprite click ScratchSpriteMorph. If you want only the stage click ScratchStageMorph. For all three you will next press the box labeled 'class'
next click block specs, and then block specs (in the last pane)
Here you will insert in ()'s the code for the block. Then in-between apostrophes (''s) you insert what the block will have on it. Inside the apostrophes you may also want a text insert (put %s for one) or a number insert (put %n for one) or a boolean insert (put %b for one) or even a sprite list! (put %m for one) Next after the apostrophes you will put what shape the block is, regular (#- for one) boolean (#b for one) or reporter. (#r for one) Then type what the code that block will connect to like: doIf.
to make the actual code for a block click the button instance after in ScratchStageMorph/ScratchSpriteMorph/ScriptableScratchMorph. Then click what code it is. For motor motor ops for sensing sensing ops and under for operators put other ops because it has no operators ops.
Then in the insert highlighted green put on the top the name of the code (like the: doIf we talked about earlier) then Type your code under that. Thats all to it except to save your blocks permanently re shift click the R in Scratch and select save image end user.
For two of the most useful blocks go to http://scratch.mit.edu/projects/Pecola1/1429431 to make them!
BTW go to: this place for cool blocks that haven't been made.
Last edited by Pecola1 (2010-12-12 16:52:43)
Offline
Pecola1 wrote:
owetre18 wrote:
owetre18 wrote:
I need a little help with making scratch blocks. Where do you put the code? I have searched, but I can't figure it out. I know how to put the block there, but it doesn't do anything. Please help.
Off-topic: my 60th post!did anyone see this? after I posted, there was a long string of comments.
Sorry. I did see it but I was busy and forgot. First shift click the R in Scratch on the offline mode.
http://www.weebly.com/uploads/5/4/1/3/5 … 648942.png
Then select turn fill screen mode off. A white spot will appear and you left click on it to open the world menu.
http://www.weebly.com/uploads/5/4/1/3/5 … 535877.png
Click open. Click browser.
http://www.weebly.com/uploads/5/4/1/3/5 … 809039.png
The system browser will open.
http://www.weebly.com/uploads/5/4/1/3/5 … 213029.png
To make a block: in the first pane click Scratch Objects. Next you will chose according to what you are making the block for. (stage, sprite,or both) If you want both click ScriptableScratchMorph. If you want only a sprite click ScratchSpriteMorph. If you want only the stage click ScratchStageMorph. For all three you will next press the box labeled 'class'
http://www.weebly.com/uploads/5/4/1/3/5 … 333479.png
next click block specs, and then block specs (in the last pane)
http://www.weebly.com/uploads/5/4/1/3/5 … 774132.png
Here you will insert in ()'s the code for the block. Then in-between apostrophes (''s) you insert what the block will have on it. Inside the apostrophes you may also want a text insert (put %s for one) or a number insert (put %n for one) or a boolean insert (put %b for one) or even a sprite list! (put %m for one) Next after the apostrophes you will put what shape the block is, regular (#- for one) boolean (#b for one) or reporter. (#r for one) Then type what the code that block will connect to like: doIf.
to make the actual code for a block click the button instance after in ScratchStageMorph/ScratchSpriteMorph/ScriptableScratchMorph. Then click what code it is. For motor motor ops for sensing sensing ops and under for operators put other ops because it has no operators ops.
http://www.weebly.com/uploads/5/4/1/3/5 … 587916.png
Then in the insert highlighted green put on the top the name of the code (like the: doIf we talked about earlier) then Type your code under that. Thats all to it except to save your blocks permanently re shift click the R in Scratch and select save image end user.
http://www.weebly.com/uploads/5/4/1/3/5 … 718225.png
For two of the most useful blocks go to http://scratch.mit.edu/projects/Pecola1/1429431 to make them!
thank you! umm... sparks, this would make a great tutorial.
Offline
owetre18 wrote:
thank you! umm... sparks, this would make a great tutorial.
I think if you go to http://scratch.mit.edu/projects/shadow_7283/896001 shows you some of it. shadow_7283 is the one who taught zorket and I to hack the system. He can help you.
Last edited by Pecola1 (2010-12-12 17:01:33)
Offline
This is something I made it adds more to the ({x position} of {Sprite1}) block.
Go to Scratch Objects, Scriptable Sprite Morph, sensing ops, getAttribute:
And add the strip:
'rotation style' localized = t2 ifTrue: [^ self rotationStyle].
'pen size' localized = t2 ifTrue: [^ self penSize].
'pen shade' localized = t2 ifTrue: [^ self penShade].
'pen color' localized = t2 ifTrue: [^ self penColor].
'pen hue' localized = t2 ifTrue: [^ self penHue].
'tempo' localized = t2 ifTrue: [^ self tempo].
'height' localized = t2 ifTrue: [^ self height].
'width' localized = t2 ifTrue: [^ self width].
In-between the 'volume' localized = t2 ifTrue: [^ self volume]. and ^ 0
Then go to attributeNames and add the strip:
'rotation style' 'pen size' 'pen color' 'pen hue' 'pen shade' 'tempo' 'height' 'width'
after the 'volume'.
Then go to ScratchStageMorph and then sensing ops attributeNames and insert
'tempo' 'h pan' 'v pan'
after the 'volume'.
Then go to getAttribute: and insert:
'tempo' localized = t2 ifTrue: [^ self tempo]. 'h pan' localized = t2 ifTrue: [^ self hPan]. 'v pan' localized = t2 ifTrue: [^ self vPan].
In-between the 'volume' localized = t2 ifTrue: [^ self volume]. and ^ 0
Also you can make two reporters:
The codes wrote:
('pen hue' #r #penHue) ('pen color' #r #penColor)
P.S. The pen color block was made but it was actually the pen hue block! So I renamed them with their real names.
Last edited by Pecola1 (2010-12-13 19:37:15)
Offline
I finally made the mouse cursor hide/show blocks!
First for the Show cursor:
Block spec:
('show mouse cursor' #- #showCursor)
and the code:
showCursor World activeHand showTemporaryCursor: nil
and now for the Hide Mouse Cursor.
Blockspecs:
('hide mouse cursor' #- #hideCursor)
Now for the code!
hideCursor World activeHand showTemporaryCursor: ((Form extent: 1 @ 1 depth: 32) fillColor: Color transparent)
Offline
These all do not need a code but they have to be under ScriptableStageMorph:
block spec
('scene names' #r #sceneNames) ('rerecord scene %x' #- #rerecordScene) ('show scene %x' #- #showScene:) ('new scene' #- #newScene)
Last edited by Pecola1 (2010-12-13 11:37:29)
Offline
cool, there's lots of great ideas and blocks coming through here, I'm not on today, I have a LOT of work at the moment including the quiz I am co-hosting this evening. So I'll see about doing a block update tomorrow or wednesday.
Offline
Ever wanted the background to be able to move? Well with these new blocks you can!
#1 ScriptableStageMorph Block spec:
('H pan' #r #hPan) ('change h pan by %n' #- #changeHPanBy:) ('set h pan to %n' #- #setHPanTo:) #- ('V pan' #r #vPan) ('change v pan by %n' #- #changeVPanBy:) ('set v pan to %n' #- #setVPanTo:) #-
There are only a couple of codes you need. The first one is:
hPan
^ hPan
the second is:
vPan
^ vPan
There is also zoom I made only it doesn't work.
This is how you can make the stage draggable!:
This is how you can make the stag go to a sprite!
Last edited by Pecola1 (2010-12-13 14:31:16)
Offline
The reverse of the (< >) block is one I just made! It is the string as boolean block!
ScriptableScrtatchMorph Block Specs
('%s' #b #stringAsBoolean)
CODE:
stringAsBoolean: t1
| t2 |
t2 _ t1 asString.
(t2 = '0'
or: [t2 = '' or: [t2 = 'false']])
ifTrue: [^ false].
^ true
Last edited by Pecola1 (2010-12-13 12:18:27)
Offline
sparks wrote:
cool, there's lots of great ideas and blocks coming through here, I'm not on today, I have a LOT of work at the moment including the quiz I am co-hosting this evening. So I'll see about doing a block update tomorrow or wednesday.
Thanks. Ps I made more.
Offline
THIS BLOCK WAS NOT MADE BY ME! IT WAS JENS! GIVE HIM CREDIT!
ScriptableScratchMorph block specs
('flip' #- #flip)
CODE:
flip costume form: (self form flipBy: #horizontal centerAt: 0 @ 0). self costumeChanged
Offline