sparks wrote:
Sorry I missed those Hardmath23, I will add the variable maker and the boolean to reporter block, but I'm afraid your string to boolean isn't going to work with that code. To make that block you'd need the code
booleanstring: t1
^ t1 = 'true'
as by definition, booleans can only report true or false.
It worked for me...
Offline
Hardmath123 wrote:
Code:
('costume center' #r #rotationCenter)reports costume center
You missed this, too!
Offline
And another:
('%n ^ %n' #r #x:expy: 2 2)
x: t1 expy: t2 ^ t1 raisedTo: t2
Reports x^y!
Offline
I really like the update image
Last edited by Hardmath123 (2010-11-20 05:09:30)
Offline
Hardmath123 wrote:
I really like the update image
http://img528.imageshack.us/img528/4416/66858359.gif
Yeah, me too
Offline
Great.
Guinea_Pig_Girl's block (found here, which you need to add BTW) gives me this error when I click OK on the block editor:
When I click OK on the message, the blocks in the editor disappear (besides the hat).
Help!
Last edited by meowmeow55 (2010-11-20 15:37:04)
Offline
Bump!
Offline
meowmeow55 wrote:
Great.
Guinea_Pig_Girl's block (found here, which you need to add BTW) gives me this error when I click OK on the block editor:
http://i51.tinypic.com/dynd3n.png
When I click OK on the message, the blocks in the editor disappear (besides the hat).
Help!
The block worked for me.
Offline
Offline
SSBBM wrote:
meowmeow55 wrote:
Great.
Guinea_Pig_Girl's block (found here, which you need to add BTW) gives me this error when I click OK on the block editor:
http://i51.tinypic.com/dynd3n.png
When I click OK on the message, the blocks in the editor disappear (besides the hat).
Help!The block worked for me.
Must be something I messed with then. I don't think I made any changes that would affect this, but whatever. So, can you or someone else download the BYOB Block Library project, put in the code in the block, and upload it to Mediafire or somewhere? I'll upload it back to my site then.
Offline
chippo wrote:
you know, I think that in the next scratch there should be only one hat block, which would be: _________
/ \___________
| When < >___________|
\_/
and then all the other hat blocks would be condensed into Boolean.
for example, to use [blocks]<when green flag clicked>[/blocks]
you would put a <Green Flag Clicked?> Boolean into the only hat block.
I am trying to but one thing is hat blocks are hard to decode. For now you could do when flag clicked forever wait until (boolean)
I have found where the Hat block functions are and it looks like it was a block already made which is like a Obsolete Hat Block:
t3 = WhenHatBlockMorph ifTrue: [(t1 at: 2) ~= false ifTrue: [t6 _ self blockFromTuple: (t1 at: 2) receiver: t2. t4 replaceArgMorph: t4 argMorph by: t6]]. ^ t4
How to Find it: Go to Scratch Objects- then Scriptablescratchmorph- then the button instance- then blocks- then hatBlockFromTuple:receiver:.
http://scratch.mit.edu/static/projects/ … 684_sm.png
Last edited by Pecola1 (2010-11-22 21:29:54)
Offline
sparks wrote:
Operators
http://i56.tinypic.com/261km15.jpg
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 519161.gif Shared by Zorket.
Blockspec:('report %s' #r #report: 'hello')
Code:
report: t1
^ t1What it does:
Reports it's contents. Useful for putting text in areas where it normally can't go. (such as the [go to $Sprites$] block.http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 264827.gif Shared by Zorket, optimised by nXIII
Blockspec:('if %b then %s else %s' #r #if:then:else:)
Code:
if: t1 then: t2 else: t3
t1 ifTrue: [^ t2].
^ t3What it does:
reports the first string argument if the boolean is true, the second if it's false.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 344397.gif Shared by Zorket
Blockspec'if %b then %b else %b' #b #if:then:else:
Code:
if: t1 then: t2 else: t3
t1 ifTrue: [^ t2].
^ t3What it does
reports the truth of the first or second boolean argument depending on the truth of the first.
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://www.weebly.com/uploads/4/0/7/6/4 … 652253.gif Shared by Zorket
Blockspec'true' #b #reportTrue
Code:
reportTrue
^ trueWhat it does
reports true
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://i53.tinypic.com/5bqjxh.jpghttp://www.weebly.com/uploads/4/0/7/6/4 … 743959.gif Shared by Zorket
Blockspec'false' #b #reportFalse
Code:
reportFalse
^ falseWhat it does
reports false
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://i53.tinypic.com/5bqjxh.jpghttp://img229.imageshack.us/img229/1623/48031569.gif Shared by Zorket
Blockspec('%T %s' #r #do:to:)
Code:
do: t1 to: t2 t1 = 'reverse' ifTrue: [^ t2 reversed]. t1 = 'shuffle' ifTrue: [^ t2 shuffled]. t1 = 'uppercase' ifTrue: [^ t2 asUppercase]. t1 = 'lowercase' ifTrue: [^ t2 asLowercase]. t1 = 'report' ifTrue: [^ t2].Scratch blocks> commandBlockMorph> all> uncoloredArgMorphFor: add a strip:
Code:
$T = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #mixingNames; choice: 'reverse'].Scratch objects> scriptableScratchMorph> LOW then press class> otherOps:
Code:
mixingNames ^ #('lowercase' 'uppercase' 'reverse' 'shuffle' 'report' )http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
http://img258.imageshack.us/img258/2512/92187613.gif Shared by Hardmath123.
Blockspec:('%b' #r #booleanstring:)
Code:
booleanstring: t1
^ t1What it does:
Allows you to drop booleans into reporter spaces!
http://dl.dropbox.com/u/6273449/BlockLibDiv2.png
^ Back to Scratch Blocks
^ Back to Contents
okay. so here is a new block I made which you did not add. here it is
Offline
I have a block request!
A boolean looks block that is like this:
(Saying:(type text here))
I know the code but I do not know how to program it
Offline
zorket wrote:
sparks wrote:
sounds good Zorket You're already top scratch block contributor!
here's a challange for you, can you make any of these?
[clear line (n) or file [s]]
[write [s] to line (n) in file [s]]
?Oh, you got me. But I'm gonna be working on blocks like [if touching [sprite], delete self]
I see you are a block maker... is a block that was made by scratch but they didn't finish it. All you have to do is make a block and the blocks name (under block specs) has #W at the end instead of #b or #l or any of the others (there are about 10 or 20).
Offline
Pecola1 wrote:
zorket wrote:
sparks wrote:
sounds good Zorket You're already top scratch block contributor!
here's a challange for you, can you make any of these?
[clear line (n) or file [s]]
[write [s] to line (n) in file [s]]
?Oh, you got me. But I'm gonna be working on blocks like [if touching [sprite], delete self]
I see you are a block maker... http://scratch.mit.edu/static/projects/ … 684_sm.png is a block that was made by scratch but they didn't finish it. All you have to do is make a block and the blocks name (under block specs) has #W at the end instead of #b or #l or any of the others (there are about 10 or 20).
I am quoting myself for no reason.
Offline
.
Scratch blocks added: [2]
(costume centre) Shared by Hardmath123
((n)^(n)) Shared by Hardmath123
BYOB blocks added: [2]
[glide (n) secs to sprite [s]] Shared by Guinea_Pig_Girl
[make line from x:(n)y:(n) to x:(n)y:(n)] (updated) Shared by SSBBM
Block requests
<saying [s]?>
Other Updates:
♦ Fixed image for Johnnydean1's (ask in dialog [s]) block
♦Home post updated
♦Plea from meowmeow55, read it here and help if you can!
♦What should I do about this block post? does it go as a block submission if it already exists?
♦Total blocks shared in the library has hit 113! That's more than I ever imagined! Thanks for everyone's contributions! You can, of course, see all the contributors in the statistics post.
♦@Pecola: Please post the code for the ascii block(s) you linked me to rather than linking to a project, my java player is broken, thanks :)
________________________________________________________________________________
^home
^updates archive
Last edited by sparks (2010-11-24 17:16:10)
Offline
Yay, 2nd place in contributors with 4, second only to Zorket!
Offline
Ta-Da!
getconstant: t1 t1 = 'pi' ifTrue: [^ '3.141592653']. t1 = 'phi' ifTrue: [^ '1.61803399']. t1 = 'e' ifTrue: [^ '2.71828183']. t1 = 'sqrt 2' ifTrue: [^ '1.41421356']. ^ 3.141592653
('%T' #r #getconstant:)
Scratch-Objects»ScriptableScratchMorph»sensing
constants ^ #('pi' 'phi' 'e' 'sqrt 2' )
Scratch-Blocks»CommandBlockMorph»-- all --»uncoloredArgMorphFor:
REPLACE ALL WITH
uncoloredArgMorphFor: t1 | t2 | t2 _ t1 at: 2. $a = t2 ifTrue: [^ AttributeArgMorph new choice: 'volume']. $b = t2 ifTrue: [^ BooleanArgMorph new]. $c = t2 ifTrue: [^ ColorArgMorph new showPalette: true]. $C = t2 ifTrue: [^ ColorArgMorph new showPalette: false]. $d = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '0'; menuSelector: #directionMenu]. $D = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '48'; menuSelector: #midiDrumMenu]. $e = t2 ifTrue: [^ EventTitleMorph new]. $f = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #mathFunctionNames; choice: 'sqrt']. $g = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #graphicEffectNames; choice: 'color']. $H = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupSensorNames]. $h = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #hookupBooleanSensorNames]. $I = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #midiInstrumentMenu]. $i = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #listIndexMenu]. $k = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #keyNames; choice: 'space']. $L = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #listVarMenu]. $l = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #costumeNames; choice: 'costume1']. $m = t2 ifTrue: [^ SpriteArgMorph new]. $M = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorNames]. $n = t2 ifTrue: [^ ExpressionArgMorph new numExpression: '10']. $N = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '60'; menuSelector: #noteSelector]. $s = t2 ifTrue: [^ ExpressionArgMorph new stringExpression: '']. $S = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #soundNames; choice: 'pop']. $v = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #varNamesMenu; choice: '']. $W = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #motorDirection]. $x = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #sceneNames; choice: '']. $y = t2 ifTrue: [^ ExpressionArgMorphWithMenu new numExpression: '1'; menuSelector: #listIndexForDeleteMenu]. $T = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #constants; choice: 'pi']. ^ ExpressionArgMorph new numExpression: '10'
Gives out the selected constants. Note the better arrows '»'
Meant to replace the pi block Zorket and I gave.
Officially my best block yet.
If you want to add a constant, just tell me.
Last edited by Hardmath123 (2010-11-25 08:43:35)
Offline
sparks wrote:
♦[/color]@Pecola: Please post the code for the ascii block(s) you linked me to rather than linking to a project, my java player is broken, thanks
________________________________________________________________________________
^home
^updates archive
Sorry! I didn't think about that.
here is the code for blockspecs:
('ascii code of %s' #r #asciicodeof:) ('ascii %n as letter' #r #asciiLetter:)
Here is one of the codes for otherops:
asciiLetter: anInteger | code | code _ anInteger asNumberNoError. ^ String with: (Character value: code)
and here is the other code for otherops:
asciicodeof: aString | str | str _ aString asMacRoman. str size = 1 ifFalse: [^ 0]. ^ str first asciiValue
What it does: The (ascii code of [ ]) can actually help a lot more than expected! You can put: <<(ascii code of [A]) > [64]> and <(ascii code of [A]) < [91]>> it will be able to tell if the letter is capital or not! Also by saying: if <(ascii code of [Answer]) > < (96)) then set variable to (ascii code of [Answer]) and change answer by -32. set variable to ((variable) as letter). It will turn a lowercase letter to a capital!
BTW can I add you to my friends? Thanks!
Last edited by Pecola1 (2010-11-25 14:24:52)
Offline
I love the way that a) you think you have to ask me if you can add me as a friend, and b) that you thank me before I answer Of course, you're welcome to add me, it just makes your projects appear on my homepage and visa-versa
thanks for that block code, I'll get to it in a bit when I have a mo.
Offline
sparks wrote:
I love the way that a) you think you have to ask me if you can add me as a friend, and b) that you thank me before I answer Of course, you're welcome to add me, it just makes your projects appear on my homepage and visa-versa
thanks for that block code, I'll get to it in a bit when I have a mo.
LOL Thanks again. At first I didn't know you were talking to me because I didn't think you would reply within 3 seconds. XD XP Hmm... I guess Windows XP likes sticking its tong out
Offline
BYOB block: drag and drop me
block pic:
block script:
sorry the pics are a little messed up. maybe you can fix them.
Last edited by owetre18 (2010-11-25 17:26:10)
Offline
all but (number) of [list] block for byob. I'm new to this, but good.
Blocks picture:
Script picture (in the block maker):
credit to whoever made to (all but first of [list]) block. This block was based off of that block
Last edited by owetre18 (2010-11-26 18:10:20)
Offline
say script block (for byob)
what this block does: the sprite you put it in, says the script you put in it.
Offline