Greenatic wrote:
sparks wrote:
Right, I especially said that your blocks were very good to imply that you weren't creating simple blocks, Greenatic! I Agree they're fantastic! I was just sort of mentioning it to the general community
Oops. I apologize for not reading the whole post, and for mistaking it for an implied insult.
scimonster wrote:
Greenatic wrote:
By the way, has anyone made a |save image for end-user| block? I would check but my computer freezes for five minutes if I so much as look at the Block Library page 1.
I have.
Did you share it?
I submitted it before I was a Librarian, but Sparks didn't add it. >_>
Offline
('In presentation mode?' #b #inPres) inPres (self ownerThatIsA: ScratchFrameMorph) ifNil:[^ false]. ^ true
Last edited by Hardmath123 (2011-09-22 03:58:11)
Offline
Hardmath123 wrote:
Code:
('In presentation mode?' #b #inPres) inPres (self ownerThatIsA: ScratchFrameMorph) ifNil:[^ false]. ^ true
1. I think you have the returns swapped.
2. I already made a (viewing mode) block, so this is the same as <(viewing mode) = presentation>.
Offline
YourLocalBlockLib wrote:
The Block Library Is Currently Broken; DO NOT PANIC! We Are Sorting Out The Problem That Weebly Is Currently Filtered By Scratch
I fixed the first post, but I'm gonna talk to the ST to see if they'll give us an exception for welcometoyourlocalblocklibrary.weebly.com
~~Scimonster
Last edited by YourLocalBlockLib (2011-09-22 09:02:36)
Offline
YourLocalBlockLib wrote:
YourLocalBlockLib wrote:
The Block Library Is Currently Broken; DO NOT PANIC! We Are Sorting Out The Problem That Weebly Is Currently Filtered By Scratch
I fixed the first post, but I'm gonna talk to the ST to see if they'll give us an exception for welcometoyourlocalblocklibrary.weebly.com
~~Scimonster
Uhh.... sorry guys... this is kinda my fault. I did change all those to weebly. Sorry, I hope the ST works it out.
Offline
Greenatic wrote:
Hardmath123 wrote:
Code:
('In presentation mode?' #b #inPres) inPres (self ownerThatIsA: ScratchFrameMorph) ifNil:[^ false]. ^ true1. I think you have the returns swapped.
2. I already made a (viewing mode) block, so this is the same as <(viewing mode) = presentation>.
This was made before your block, so we have to keep it, otherwise it isn't fair, I can see not allowing it if yours was before, but this block has been on for a long time and I think it should stay. And yes I think they are swapped...
Offline
Pecola1 wrote:
Greenatic wrote:
Hardmath123 wrote:
Code:
('In presentation mode?' #b #inPres) inPres (self ownerThatIsA: ScratchFrameMorph) ifNil:[^ false]. ^ true1. I think you have the returns swapped.
2. I already made a (viewing mode) block, so this is the same as <(viewing mode) = presentation>.This was made before your block, so we have to keep it, otherwise it isn't fair, I can see not allowing it if yours was before, but this block has been on for a long time and I think it should stay. And yes I think they are swapped...
Were you talking to me?
If so, mine still should go in the library because it adds compatibility for normal vs quarter mode.
Offline
When run, opens an untitled menu with the items of the "items" list. It then reports the corresponding value of the "action" list. Waits for an answer. To add a line, add a single dash to both lists at the same index. Note that the lists must be of identical length, or it reports nil.
('menu items: %L actions: %L' #r #MenuItem:Action: 'list' 'list') MenuItem: t1 Action: t2 | t3 t4 | (self lineCountOfList: t1) = 0 | (self lineCountOfList: t2) = 0 | (self lineCountOfList: t1) ~= (self lineCountOfList: t2) ifTrue: [^ nil]. t3 _ CustomMenu new. t4 _ 1. (self lineCountOfList: t1) timesRepeat: [(self getLine: t4 ofList: t1) = '-' & (self getLine: t4 ofList: t2) = '-' ifTrue: [t3 addLine]. (self getLine: t4 ofList: t1) = '-' & (self getLine: t4 ofList: t2) = '-' ifFalse: [t3 add: (self getLine: t4 ofList: t1) action: (self getLine: t4 ofList: t2)]. t4 _ t4 + 1]. ^ t3 localize startUp
ScriptableScratchMorph > blocks > defaultArgsFor:
Add this code before the last line (^ t2):
#MenuItem:Action: = t4 ifTrue: [t2 size >= 2 ifTrue: [t2 at: 1 put: self defaultListName. t2 at: 2 put: self defaultListName]].
Functions like the above block, but the menu will have a title if this block is used.
('menu title: %s items: %L actions: %L' #r #MenuTitle:Item:Action: '' 'list' 'list') MenuTitle: t1 Item: t2 Action: t3 | t4 t5 | (self lineCountOfList: t2) = 0 | (self lineCountOfList: t3) = 0 | (self lineCountOfList: t2) ~= (self lineCountOfList: t3) ifTrue: [^ nil]. t4 _ CustomMenu new title: t1. t5 _ 1. (self lineCountOfList: t2) timesRepeat: [(self getLine: t5 ofList: t2) = '-' & (self getLine: t5 ofList: t3) = '-' ifTrue: [t4 addLine]. (self getLine: t5 ofList: t2) = '-' & (self getLine: t5 ofList: t3) = '-' ifFalse: [t4 add: (self getLine: t5 ofList: t2) action: (self getLine: t5 ofList: t3)]. t5 _ t5 + 1]. ^ t4 localize startUp
ScriptableScratchMorph > blocks > defaultArgsFor:
Add this code before the last line (^ t2):
#MenuTitle:Item:Action: = t4 ifTrue: [t2 size >= 3 ifTrue: [t2 at: 1 put: (t2 at: 1) localized. t2 at: 2 put: self defaultListName. t2 at: 3 put: self defaultListName]].
Offline
('perimeter of triangle (%n,%n)(%n,%n)(%n,%n)' #r #TriPeriX:y:X:y:X:y:) TriPeriX: t1 y: t2 X: t3 y: t4 X: t5 y: t6 ^ ((((t1 - t3) * (t1 - t3)) + ((t2-t4)* (t2-t4))) sqrt) + ((((t3 - t5) * (t3 - t5)) + ((t4-t6)* (t4-t6))) sqrt) +( (((t5 - t1) * (t5 - t1)) + ((t6-t2)* (t6-t2))) sqrt)
('area of triangle (%n,%n)(%n,%n)(%n,%n)' #r #TriAreaX:y:X:y:X:y:) TriAreaX: t1 y: t2 X: t3 y: t4 X: t5 y: t6 | t7 t8 t9 | t7 _ (((t1 - t3) * (t1 - t3)) + ((t2-t4)* (t2-t4))) sqrt. t8 _ 1. (((((t3 - t5) * (t3 - t5)) + ((t4-t6)* (t4-t6))) sqrt) > t7) ifTrue:[ t7 _ ((((t3 - t5) * (t3 - t5)) + ((t4-t6)* (t4-t6))) sqrt). t8 _ 2]. (((((t5 - t1) * (t5 - t1)) + ((t6-t1)* (t6-t1))) sqrt) > t7) ifTrue:[ t7 _ ((((t5 - t1) * (t5 - t1)) + ((t6-t1)* (t6-t1))) sqrt). t8 _ 3]. t8 = 1 ifTrue:[ t9 _ ((t1 + t3)/2) @ ((t2 + t4)/2). ^ 0.5 * t7 * ((((t9 x) - t5) * ((t9 x) - t5)) + (((t9 y) -t6)* ((t9 y) -t6))) sqrt]. t8 = 2 ifTrue:[ t9 _ ((t3 + t5)/2) @ ((t4 + t6)/2). ^ 0.5 * t7 * ((((t9 x) - t1) * ((t9 x) - t1)) + (((t9 y) -t2)* ((t9 y) -t2))) sqrt]. t8 = 3 ifTrue:[ t9 _ ((t5 + t1)/2) @ ((t5 + t1)/2). ^ 0.5 * t7 * ((((t9 x) - t3) * ((t9 x) - t3)) + (((t9 y) -t4)* ((t9 y) -t4))) sqrt].
Offline
Pecola1 wrote:
YourLocalBlockLib wrote:
YourLocalBlockLib wrote:
The Block Library Is Currently Broken; DO NOT PANIC! We Are Sorting Out The Problem That Weebly Is Currently Filtered By Scratch
I fixed the first post, but I'm gonna talk to the ST to see if they'll give us an exception for welcometoyourlocalblocklibrary.weebly.com
~~ScimonsterUhh.... sorry guys... this is kinda my fault. I did change all those to weebly. Sorry, I hope the ST works it out.
Still no reply on the thread. Time to email them.
Don't worry Pecola1.
Offline
Opens a "Fill In The Blank" prompt and reports contents after they are entered. If "Cancel" is pressed, reports a nil string. Leave the first argument blank for untitled; leave the second argument blank for no default text.
('FillInTheBlank prompt title:%s default:%s' #r #FITBTitle:Default:) FITBTitle: t1 Default: t2 ^ FillInTheBlank request: t1 initialAnswer: t2
Offline
Reports how far through the sound you are. Reports 0 if the sound does not exist or is not playing.
('time through %S' #r #TimeThrough:) TimeThrough: t1 | t2 | t2 _ self soundNamed: t1 ifAbsent:[^ 0]. t2 isPlaying ifFalse:[^ 0]. t2 currentSeconds
Offline
Greenatic wrote:
http://www.freewebs.com/polyeztahpuppie … efault.gif
Opens a "Fill In The Blank" prompt and reports contents after they are entered. If "Cancel" is pressed, reports a nil string. Leave the first argument blank for untitled; leave the second argument blank for no default text.Code:
('FillInTheBlank prompt title:%s default:%s' #r #FITBTitle:Default:) FITBTitle: t1 Default: t2 ^ FillInTheBlank request: t1 initialAnswer: t2
cool!
Offline
tpaley wrote:
Greenatic wrote:
http://www.freewebs.com/polyeztahpuppie … efault.gif
Opens a "Fill In The Blank" prompt and reports contents after they are entered. If "Cancel" is pressed, reports a nil string. Leave the first argument blank for untitled; leave the second argument blank for no default text.Code:
('FillInTheBlank prompt title:%s default:%s' #r #FITBTitle:Default:) FITBTitle: t1 Default: t2 ^ FillInTheBlank request: t1 initialAnswer: t2cool!
Thanks!
Offline
roijac wrote:
improved case=sensitive BYOB
http://i.imgur.com/IsZFu.gif
download link:http://www.megaupload.com/?d=MQSWDR3A
what do those do?
Offline
Greenatic wrote:
Pecola1 wrote:
scimonster wrote:
Could you provide explanations?
And when I do that update, we'll have to crown Greenatic as the new Scratch Blocks champ. ;DSweet! NEW CHAMP? I don't even remember him/her being here before summer! LOL
I wasn't. (Him, by the way!)
Lol, looking back at the first block I made, the one w/ jslomba, I imagine how quickly I could have made that now...
BTW, were you just trying to get me to pause so you could catch up? No way that's happening! More blocks now!
http://www.freewebs.com/polyeztahpuppie … bounds.gifCode:
('x:%n y: %n is within my bounds?' #b #WithinBoundsX:y:) WithinBoundsX: t1 y: t2 ^ (t1 <= (self xpos + (0.5 * self width))) & (t1 >= (self xpos - (0.5 * self width))) & (t2 <= (self ypos + (0.5 * self height))) & (t2 >= (self ypos - (0.5 * self height)))NOTE: The following two blocks require an alteration to the presentMenu method. See the |make { v} draggable| and |make { v} undraggable| for instructions, but remember to use the methods of these blocks.
http://www.freewebs.com/polyeztahpuppie … bounds.gifCode:
('%m center is within my bounds?' #b #CentWithin:) CentWithin: t1 ^ ((t1 xpos) <= (self xpos + (0.5 * self width))) & (((t1 xpos) >= (self xpos - (0.5 * self width))) & ((t1 ypos) <= (self ypos + (0.5 * self height))) & ((t1 ypos) >= (self ypos - (0.5 * self height))))http://www.freewebs.com/polyeztahpuppie … bounds.gif
Code:
('%m is completely within my bounds?' #b #CompWithin:) CompWithin: t1 ^ t1 xpos + (0.5 * t1 width) <= (self xpos + (0.5 * self width)) & (t1 xpos - (0.5 * t1 width) >= (self xpos - (0.5 * self width))) & (t1 ypos + (0.5 * t1 height) <= (self ypos + (0.5 * self height))) & (t1 ypos - (0.5 * t1 height) >= (self ypos - (0.5 * self height)))
how is "my bounds" defined?
Offline
This is going to be really helpful. Like uhh...
<say[((<{addition}><+><{2nd number}>))] for my random question game. The fourth one!
Offline
guitarherofan wrote:
This is going to be really helpful. Like uhh...
<say[((<{addition}><+><{2nd number}>))] for my random question game. The fourth one!
you can't upload projects you make with them though
Offline
tpaley wrote:
roijac wrote:
improved case=sensitive BYOB
http://i.imgur.com/IsZFu.gif
download link:http://www.megaupload.com/?d=MQSWDR3Awhat do those do?
they are case-sensitive checks: <CaSe=case> will return true with the normal block, but with mine only <case=case> or <CaSe=CaSe> will be true.
Offline
Greenatic wrote:
http://www.freewebs.com/polyeztahpuppie … efault.gif
Opens a "Fill In The Blank" prompt and reports contents after they are entered. If "Cancel" is pressed, reports a nil string. Leave the first argument blank for untitled; leave the second argument blank for no default text.Code:
('FillInTheBlank prompt title:%s default:%s' #r #FITBTitle:Default:) FITBTitle: t1 Default: t2 ^ FillInTheBlank request: t1 initialAnswer: t2
What's FITB? I've never heard of anything like that in Scratch.
Greenatic wrote:
http://www.freewebs.com/polyeztahpuppie … hrough.gif
Reports how far through the sound you are. Reports 0 if the sound does not exist or is not playing.Code:
('time through %S' #r #TimeThrough:) TimeThrough: t1 | t2 | t2 _ self soundNamed: t1 ifAbsent:[^ 0]. t2 isPlaying ifFalse:[^ 0]. t2 currentSeconds
How could it not exist?
And could you make one that sets how far? :3
Offline
YourLocalBlockLib wrote:
[b]The Block Library Is Currently Broken; DO NOT PANIC! We Are Sorting Out The Problem That Weebly Is Currently Filtered By Scratch
You should make a folder called assets on your scratchr.org site.
Offline
IHeartGaming wrote:
YourLocalBlockLib wrote:
The Block Library Is Currently Broken; DO NOT PANIC! We Are Sorting Out The Problem That Weebly Is Currently Filtered By Scratch
You should make a folder called assets on your scratchr.org site.
Well, we would host it, but Sparks is having trouble with the MySQL being iffy — not always working.
Offline
Host your weebly on a dot tk domain.
Offline
IHeartGaming wrote:
Host your weebly on a dot tk domain.
Now I have a dropbox, but we want to host it on the scratchr, I think.
Sparks, maybe you should put out a call in Misc to see if anyone can fix the MySQL.
Offline