This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#2051 2011-09-15 14:29:56

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Now be prepared for submission requests.  tongue  HM123

Offline

 

#2052 2011-09-15 14:32:02

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

Sorry to hear that, successor! You've been a great help  smile  I don't suppose you can finish the blocks-as-images thing for the library when you have a moment so they render arguments?

I'll do that at the weekend.  smile


/* No comment */

Offline

 

#2053 2011-09-15 14:38:07

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Thanks, successor  smile

Yes Sci, that's exactly what I'm preparing myself for *dons the helmet of cool-headedness and leaps behind the sandbags of eternal patience.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2054 2011-09-15 18:47:44

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Since we have a librarian resigning, shouldn't you hire a new one?  Hopefully a librarian that will bear some of the enormous Scratch block weight that Scimonster is currently bearing on his own...   hmm

Offline

 

#2055 2011-09-15 21:33:16

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

OK, I'm not going to just wait for you guys to do an update.  Here's some more blocks.  Pictures are now made!
http://www.freewebs.com/polyeztahpuppies/closervalue.gif

Code:

('%n closer value: %n or %n' #r #Closer:One:Two:)

Closer: t1 One: t2 Two: t3
| L g |
t1 isInf ifTrue:[^ 0].
t1 isNaN ifTrue:[^ 0].
t2 isInf ifTrue:[^ 0].
t2 isNaN ifTrue:[^ 0].
t3 isInf ifTrue:[^ 0].
t3 isNaN ifTrue:[^ 0].
L _ t2.
g _ t3.
L > g ifTrue:[
g _ t2.
L _ t3].
t1 < ((L+g)/2) ifTrue:[
^ L].
^ g

http://www.freewebs.com/polyeztahpuppies/isclosertothan.gif

Code:

('%n is closer to %n than %n?' #b #Closer:To:Than:)

Closer: t1 To: t2 Than: t3
t1 isInf ifTrue:[^ 0].
t1 isNaN ifTrue:[^ 0].
t2 isInf ifTrue:[^ 0].
t2 isNaN ifTrue:[^ 0].
t3 isInf ifTrue:[^ 0].
t3 isNaN ifTrue:[^ 0].
^ ((t2 - t1) abs) < ((t2 - t3) abs)

Note: Since it has to be closer, numbers with equal distance, such as <12 is closer to 11 than 10>, will return false.
http://www.freewebs.com/polyeztahpuppies/viewingmode.gif

Code:

('viewing mode' #r #ViewingMode)

ViewingMode
(self ownerThatIsA: ScratchFrameMorph) ifNil: [^ 'presentation'].
^ (self ownerThatIsA: ScratchFrameMorph) viewMode asString

EDIT:  Never mind.
EDIT2:  I'm using the Panther block maker to make block pictures; SO much easier!  They're still Scratch blocks though.
EDIT3:  Blocks made.  Panther makes blockmaking so much easier!   big_smile
EDIT4:  (viewing mode) fixed!

Last edited by Greenatic (2011-09-17 14:13:40)

Offline

 

#2056 2011-09-16 02:01:20

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: ITopic: Welcome to your local block library!

can i replace the successor as a librarian?


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#2057 2011-09-16 04:40:42

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

@joefarebrother: Sorry, I don't think you'll be chosen. I was kinda thinking Hardmath123 would do a good job.
@Greenatic: The second should be a boolean.

Offline

 

#2058 2011-09-16 04:43:28

wulfmaster
Scratcher
Registered: 2011-04-23
Posts: 500+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

@joefarebrother: Sorry, I don't think you'll be chosen. I was kinda thinking Hardmath123 would do a good job.
@Greenatic: The second should be a boolean.

:S I should have stayed, then I would have had a shot -_- :S


Social Connections - Bringing communities close together! http://cyberkidscountry.com/ip.php

Offline

 

#2059 2011-09-16 06:19:42

sci_test
Scratcher
Registered: 2011-06-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

Greenatic, the first and second are like opposites, right?
The first reports which it's closer to, and the second reports if it's closer to A.


[signature removed - please be respectful]
Last edited by scimonster (1970-01-01 00:00:00)

Offline

 

#2060 2011-09-16 07:34:14

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

can I replace TS?  big_smile


the the the the the

Offline

 

#2061 2011-09-16 07:42:20

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Scimonster, please don't reject people because you want me to become the next BL, because I don't really have time to manage that much at all.  sad


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#2062 2011-09-16 07:54:03

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

jslomba wrote:

can I replace TS?  big_smile

I think LS97 or NXII would make good block librarians, too.


the the the the the

Offline

 

#2063 2011-09-16 08:08:55

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Hardmath123 wrote:

Scimonster, please don't reject people because you want me to become the next BL, because I don't really have time to manage that much at all.  sad

That's not why; it's because I don't think he would have done a good job.  tongue

@jslomba: nXIII quit, but he would have done a good job too. :3

Offline

 

#2064 2011-09-16 08:13:42

Ashurathehedgehog
Scratcher
Registered: 2010-12-16
Posts: 100+

Re: ITopic: Welcome to your local block library!

Sorry, but do you have a SIMPLE url block code without "box 1" and stuff? and if so, please can you post a link to the page. (ps, not allowed to download)


Oh great. hit my 100th post. thankz liru.

Offline

 

#2065 2011-09-16 08:15:27

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Ashurathehedgehog wrote:

Sorry, but do you have a SIMPLE url block code without "box 1" and stuff? and if so, please can you post a link to the page. (ps, not allowed to download)

lol, we're talking about the blocks in scratch, not url blocks.


the the the the the

Offline

 

#2066 2011-09-16 09:15:51

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Ashurathehedgehog wrote:

Sorry, but do you have a SIMPLE url block code without "box 1" and stuff? and if so, please can you post a link to the page. (ps, not allowed to download)

What do you mean? Like the block has a set URL to open?

Offline

 

#2067 2011-09-16 12:27:48

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: ITopic: Welcome to your local block library!

As brilliant as nXIII is, I'm not sure he'd have the time or patience for it  tongue  I agree hardmath123 would be an excellent choice but he seems to think he's too busy which is fine.

I'm working both Saturday and Sunday This week so won't be on much, could someone perhaps mildly nag theSuccessor about the block image renderer project for me since I can't?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2068 2011-09-16 14:09:31

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sparks wrote:

As brilliant as nXIII is, I'm not sure he'd have the time or patience for it  tongue  I agree hardmath123 would be an excellent choice but he seems to think he's too busy which is fine

what about LS97?


the the the the the

Offline

 

#2069 2011-09-16 16:09:41

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

scimonster wrote:

@Greenatic: The second should be a boolean.

Oh yeah...I better go fix that.  tongue

EDIT:  Fixed.

Last edited by Greenatic (2011-09-16 16:23:21)

Offline

 

#2070 2011-09-16 16:24:34

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Ashurathehedgehog wrote:

Sorry, but do you have a SIMPLE url block code without "box 1" and stuff? and if so, please can you post a link to the page. (ps, not allowed to download)

You mean just a block that opens a url?

('open URL %s' #- #OpenURL:)

OpenURL: t1
ScratchPlugin primOpenURL: t1

sci_test wrote:

Greenatic, the first and second are like opposites, right?
The first reports which it's closer to, and the second reports if it's closer to A.

Yes.   smile

Last edited by Greenatic (2011-09-16 16:25:31)

Offline

 

#2071 2011-09-16 16:52:07

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

http://www.freewebs.com/polyeztahpuppies/gcfofand.gif

Code:

('GCF of %n and %n' #r #GCF:And:)

GCF: t1 And: t2
| L c gcf |
t1 isInf ifTrue:[^ 0].
t1 isNaN ifTrue:[^ 0].
t2 isInf ifTrue:[^ 0].
t2 isNaN ifTrue:[^ 0].
L _ t1 abs.
L > (t2 abs) ifTrue:[
L _ t2 abs].
c _ 1.
gcf _ 1.
[L < c] whileFalse:[
(t1/c) = ((t1/c) rounded) ifTrue:[
(t2/c) = ((t2/c) rounded) ifTrue:[
gcf _ c]].
c_c+1].
^ gcf

http://www.freewebs.com/polyeztahpuppies/lcmofand.gif

Code:

('LCM of %n and %n' #r #LCM:And:) 

LCM: t1 And: t2
|L c gcf |
t1 isInf ifTrue:[^ 0].
t1 isNaN ifTrue:[^ 0].
t2 isInf ifTrue:[^ 0].
t2 isNaN ifTrue:[^ 0].
L _ t1 abs.
L > (t2 abs) ifTrue:[
L _ t2 abs].
c _ 1.
gcf _ 1.
[L < c] whileFalse:[
(t1/c) = ((t1/c) rounded) ifTrue:[
(t2/c) = ((t2/c) rounded) ifTrue:[
gcf _ c]].
c_c+1].
^ (t1*t2)/gcf

Last edited by Greenatic (2011-09-16 19:16:04)

Offline

 

#2072 2011-09-16 19:49:26

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

IMPORTANT NOTE:  In the library post, Scimonster incorrectly stated the location of some code for my |make {  v} draggable| and |make {  v} undraggable| blocks.  Scratch-Blocks > SpriteArgMorph > event handling > presentMenu is the correct location; he used "other" instead of "event handling".

http://www.freewebs.com/polyeztahpuppies/imageexists.gif

Code:

('image %s exists?' #b #ImageExists:)

ImageExists: t1
media do: [: t2| 
(t2 asString asUTF8) = (t1, ' [image]') ifTrue:[^ true]].
^ false

http://www.freewebs.com/polyeztahpuppies/soundexists.gif

Code:

('sound %s exists?' #b #SoundExists:)

SoundExists: t1
media do: [: t2| 
(t2 asString asUTF8) = (t1, ' [sound]') ifTrue:[^ true]].
^ false

http://www.freewebs.com/polyeztahpuppies/mediaitemexists.gif
(checks costumes/backgrounds and sounds)

Code:

('media item %s exists?' #b #MediaExists:)

MediaExists: t1
media do:[:t2|
t2 isImage ifTrue:[
(t2 asString asUTF8) = (t1, ' [image]') ifTrue:[^ true]].
t2 isSound ifTrue:[
(t2 asString asUTF8) = (t1, ' [sound]') ifTrue:[^ true]]].
^ false

NOTE: The next three require the three above blocks, and a method alteration.  See the |make {  v} draggable| and |make {  v} undraggable| blocks for instructions on the presentMenu alteration, but use the methods outlined in these blocks.
http://www.freewebs.com/polyeztahpuppies/imageexistsat.gif

Code:

('image %s exists at %m?' #b #Image:ExistsAt:)

Image: t1 ExistsAt: t2
| t3 |
t3 _ self coerceSpriteArg: t2.
(t3 isKindOf: ScriptableScratchMorph)
ifFalse: [^ 0].
^ t3 ImageExists: t1

http://www.freewebs.com/polyeztahpuppies/soundexistsat.gif

Code:

('sound %s exists at %m?' #b #Sound:ExistsAt:)

Sound: t1 ExistsAt: t2
| t3 |
t3 _ self coerceSpriteArg: t2.
(t3 isKindOf: ScriptableScratchMorph)
ifFalse: [^ 0].
^ t3 SoundExists: t1

http://www.freewebs.com/polyeztahpuppies/mediaitemexistsat.gif

Code:

('media item %s exists at: %m?' #b #Media:ExistsAt:)

Media: t1 ExistsAt: t2 
| t3 |
t3 _ self coerceSpriteArg: t2.
(t3 isKindOf: ScriptableScratchMorph)
ifFalse: [^ 0].
^ t3 MediaExists: t1

Last edited by Greenatic (2011-09-20 20:51:51)

Offline

 

#2073 2011-09-17 10:23:21

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: ITopic: Welcome to your local block library!

will someone do a byob update soon?


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#2074 2011-09-17 10:36:27

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: ITopic: Welcome to your local block library!

joefarebrother wrote:

will someone do a byob update soon?

Or how about a full Scratch blocks update?

Offline

 

#2075 2011-09-17 14:00:40

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Greenatic wrote:

IMPORTANT NOTE:  In the library post, Scimonster incorrectly stated the location of some code for my |make {  v} draggable| and |make {  v} undraggable| blocks.  Scratch-Blocks > SpriteArgMorph > event handling > presentMenu is the correct location; he used "other" instead of "event handling".

Tomorrow.

Greenatic wrote:

joefarebrother wrote:

will someone do a byob update soon?

Or how about a full Scratch blocks update?

^^;
I'm not so good at BYOB updates, but I'll try if I can find them.

Offline

 

Board footer