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

#926 2010-12-22 17:07:08

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

We have our competition winner!

Pecola1 wins with this image:
http://www.weebly.com/uploads/5/4/1/3/5 … 80.png?713

Which shall adorn the block library until the first of january! Congratulations!

YAY! I liked this one better than the other one I put.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#927 2010-12-22 17:50:31

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

ssss wrote:

I like that!  And the Exit scratch one...  But, on another note I want one that can detect whether or not in presentation mode...

there already is one, ssss!  tongue  you can always do a search!

http://scratch.mit.edu/forums/viewtopic … 12#p544812

But that's in Panther.  I need the code for Scratch


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#928 2010-12-22 18:04:14

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

ssss wrote:

sparks wrote:

ssss wrote:

I like that!  And the Exit scratch one...  But, on another note I want one that can detect whether or not in presentation mode...

there already is one, ssss!  tongue  you can always do a search!

http://scratch.mit.edu/forums/viewtopic … 12#p544812

But that's in Panther.  I need the code for Scratch

In scratch it is the same only it works a little different

under block specs what you do is first put:

('BOX#1' #BOX#2 #theNameYouWantItToBeNamed)

and under Instance:

Code:

theNameYouWantItToBeNamed
BOX#3

Thats all to it!




So it would be:

('in presentation mode?' #b #presentationBoolean)

and under Instance:

Code:

presentationBoolean
^ (self ownerThatIsA: OffscreenWorldMorph) notNil

sparks do I get credit for this^ ?
Converted from Panther to Scratch by Pecola1?

Last edited by Pecola1 (2010-12-22 18:30:33)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#929 2010-12-22 19:06:40

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: Welcome to the OLD local block library!

I'm currently working on a block called <math IQ test 100% complete?>
It will open up a few dialogs where you type the answer.


Marzipan11 must learn to not spoil

Offline

 

#930 2010-12-22 19:25:14

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

ssss wrote:

I gave you an internet ssss


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#931 2010-12-22 20:56:06

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

zorket wrote:

I'm currently working on a block called <math IQ test 100% complete?>
It will open up a few dialogs where you type the answer.

If you do you should make one that reports how much you got right.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#932 2010-12-23 08:12:38

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

Re: Welcome to the OLD local block library!

Of course you get credit for converting the block to Scratch!  smile

Maybe wait until the website is up and running before enthusiastically converting every single Panther block to Scratch and back as I worry you are about to...  tongue

Last edited by sparks (2010-12-23 08:13:25)


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

Offline

 

#933 2010-12-23 11:36:00

beary605
Scratcher
Registered: 2010-02-06
Posts: 8

Re: Welcome to the OLD local block library!

how do i make those scroll-down menus in the "sqrt of ___" block?

Offline

 

#934 2010-12-23 12:38:00

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

sparks wrote:

Of course you get credit for converting the block to Scratch!  smile

Maybe wait until the website is up and running before enthusiastically converting every single Panther block to Scratch and back as I worry you are about to...  tongue

LOL No I wont convert every single one. Just the ones that don't include files, those won't work on scratch. JK LOL XD


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#935 2010-12-23 12:55:03

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

beary605 wrote:

how do i make those scroll-down menus in the "sqrt of ___" block?

First you have to make a code. under scratch objects, scriptable scratch morph, and under one of the ops. (Whichever the block you will use belongs to.)
It should look like this

yourListName
    ^ #('your first list insert' 'your second list insert' 'your third list insert' 'etc.' )

Then you need to go to a new place you may have never gone. go to Scratch-Blocks, CommandBlockMorph, --- all ---, (scroll down to the second to last) uncoloredArgMorphFor: you will see a lot of text, It will look like:

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].
    $R = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #operatorNames;
         choice: '+'].
    $e = t2 ifTrue: [^ EventTitleMorph new].
    $f = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #mathFunctionNames;
         choice: 'sqrt'].
    $g = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #graphicEffectNames;
         choice: 'color'].
    $j = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #engineNames;
         choice: 'google'].
    $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].
    ^ ExpressionArgMorph new numExpression: '10'

Now add,

$Your one letter(must not be one of the above letters) = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #yourListName;
         choice: 'default choice'].].

right above the last line (^ ExpressionArgMorph new numExpression: '10')
Now when making your block put

('%Your one letter' #type of block #codeToBlock:)

Did that help?

Last edited by Pecola1 (2010-12-23 12:56:53)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#936 2010-12-23 14:08:01

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: Welcome to the OLD local block library!

sparks wrote:

Of course you get credit for converting the block to Scratch!  smile

Maybe wait until the website is up and running before enthusiastically converting every single Panther block to Scratch and back as I worry you are about to...  tongue

(If you were talking to my block) I'm not really converting. I'm making this myself.


Marzipan11 must learn to not spoil

Offline

 

#937 2010-12-23 18:20:50

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

ssss wrote:

sparks wrote:


there already is one, ssss!  tongue  you can always do a search!

http://scratch.mit.edu/forums/viewtopic … 12#p544812

But that's in Panther.  I need the code for Scratch

In scratch it is the same only it works a little different

under block specs what you do is first put:

('BOX#1' #BOX#2 #theNameYouWantItToBeNamed)

and under Instance:

Code:

theNameYouWantItToBeNamed
BOX#3

Thats all to it!




So it would be:

('in presentation mode?' #b #presentationBoolean)

and under Instance:

Code:

presentationBoolean
^ (self ownerThatIsA: OffscreenWorldMorph) notNil

sparks do I get credit for this^ ?
Converted from Panther to Scratch by Pecola1?

zorket wrote:

sparks wrote:

Of course you get credit for converting the block to Scratch!  smile

Maybe wait until the website is up and running before enthusiastically converting every single Panther block to Scratch and back as I worry you are about to...  tongue

(If you were talking to my block) I'm not really converting. I'm making this myself.

He was talking about my block example for sss.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#938 2010-12-23 18:21:48

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

ssss wrote:

sparks wrote:

there already is one, ssss!  tongue  you can always do a search!

http://scratch.mit.edu/forums/viewtopic … 12#p544812

But that's in Panther.  I need the code for Scratch

In scratch it is the same only it works a little different

under block specs what you do is first put:

('BOX#1' #BOX#2 #theNameYouWantItToBeNamed)

and under Instance:

Code:

theNameYouWantItToBeNamed
BOX#3

Thats all to it!
yes!  Thank YOU!!!



So it would be:

('in presentation mode?' #b #presentationBoolean)

and under Instance:

Code:

presentationBoolean
^ (self ownerThatIsA: OffscreenWorldMorph) notNil

sparks do I get credit for this^ ?
Converted from Panther to Scratch by Pecola1?

thanks!

Last edited by ssss (2010-12-23 18:26:44)


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#939 2010-12-23 18:22:46

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

LOL sparks btw I have been making all the Panther blocks on Scratch since I started the library. I didn't know that the panther blocks weren't for Scratch.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#940 2010-12-23 18:25:35

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

zorket wrote:

sad  Pecola, why?

WHY WHAT!?!?!?!??!


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#941 2010-12-23 18:27:02

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

ssss wrote:

yeah.  Sparks, could you help me with my mod... please

I have always wanted to help make a mod! Could I help? I am top scratch block contributer.

Pecola1 wrote:

SSSS I have moved your conversation about the mod to: http://scratch.mit.edu/forums/viewtopic … 04#p629104

I would love to help.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#942 2010-12-23 18:28:27

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

Pecola1 wrote:

ssss wrote:

yeah.  Sparks, could you help me with my mod... please

I have always wanted to help make a mod! Could I help? I am top scratch block contributer.

Pecola1 wrote:

SSSS I have moved your conversation about the mod to: http://scratch.mit.edu/forums/viewtopic … 04#p629104

I would love to help.

I know - I looked at the coding of the presentation block - what would i change to make a 'Open Presentation mode?' block?  And a 'Close Presentation mode'?


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#943 2010-12-23 19:43:04

Marioblender
Scratcher
Registered: 2010-04-04
Posts: 31

Re: Welcome to the OLD local block library!

Like the 'costume #' block, should there be a 'sound #' and a 'sprite #' block?

Offline

 

#944 2010-12-23 20:37:00

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

Marioblender wrote:

Like the 'costume #' block, should there be a 'sound #' and a 'sprite #' block?

The sprite number wouldn't work.
The sound # is great.
The better one i thought of is Instrument # and instrument name.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#945 2010-12-23 20:43:24

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

ssss wrote:

Pecola1 wrote:

Pecola1 wrote:

I have always wanted to help make a mod! Could I help? I am top scratch block contributer.

Pecola1 wrote:

SSSS I have moved your conversation about the mod to: http://scratch.mit.edu/forums/viewtopic … 04#p629104

I would love to help.

I know - I looked at the coding of the presentation block - what would i change to make a 'Open Presentation mode?' block?  And a 'Close Presentation mode'?

You would have to make A new one. May I?


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#946 2010-12-23 20:45:47

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Welcome to the OLD local block library!

http://www.weebly.com/uploads/5/4/1/3/5413503/7551528.gif

( %m touching %m ?' #b #sprite:touching:)

Code:

sprite: t1 touching: t2 
    | t3 t4 t5 t6 t7 t8 t9 |
    t3 _ self coerceSpriteArg: t2.
    t3 = #mouse
        ifTrue: 
            [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ false].
            ^ t1 containsPoint: t4 adjustedCursorPoint].
    t3 = #edge ifTrue: [^ t1 isOnEdge].
    t1 = #mouse
        ifTrue: 
            [(t4 _ self ownerThatIsA: ScratchStageMorph) ifNil: [^ false].
            ^ t3 containsPoint: t4 adjustedCursorPoint].
    (t3 isKindOf: t1 class)
        ifFalse: [^ false].
    (t1 isHidden not and: [t3 isHidden not])
        ifFalse: [^ false].
    t5 _ t1 bounds intersect: t3 bounds.
    (t5 width > 0 and: [t5 height > 0])
        ifFalse: [^ false].
    t6 _ Form extent: t5 extent depth: 2.
    t7 _ t6 deepCopy.
    t9 _ self visibility.
    self visibility: 100.
    t1 drawOn: ((FormCanvas on: t6)
            copyOffset: t5 topLeft negated).
    t1 visibility: t9.
    t9 _ t3 visibility.
    t3 visibility: 100.
    t3 drawOn: ((FormCanvas on: t7)
            copyOffset: t5 topLeft negated).
    t3 visibility: t9.
    t8 _ Bitmap new: 4 withAll: 1.
    t8 at: 1 put: 0.
    t6
        copyBits: t6 boundingBox
        from: t6
        at: 0 @ 0
        colorMap: t8.
    t7
        copyBits: t7 boundingBox
        from: t7
        at: 0 @ 0
        colorMap: t8.
    t7
        displayOn: t6
        at: 0 @ 0
        rule: Form and.
    ^ (t6 tallyPixelValues at: 1)
        < (t6 width * t6 height)

If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#947 2010-12-23 21:22:26

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Welcome to the OLD local block library!

Pecola1 wrote:

ssss wrote:

Pecola1 wrote:

Pecola1 wrote:

I have always wanted to help make a mod! Could I help? I am top scratch block contributer.

I know - I looked at the coding of the presentation block - what would i change to make a 'Open Presentation mode?' block?  And a 'Close Presentation mode'?

You would have to make A new one. May I?

Sure!  (Creditz, az uzual!)


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#948 2010-12-24 05:22:01

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

Re: Welcome to the OLD local block library!

Pecola1, What are the square brackets in smalltalk code used for? I've always wondered. also, what are hashes used for? Such as #mouse and #edge above.

And yes, Panther blocks work perfectly with Scratch - the only difference is that the way they represent arguments. People here might be interested in the guide I'm working on at the moment - "understanding an applying smalltalk in blocks" which you can view as a live document (incomplete) [here  smile

Last edited by sparks (2010-12-24 06:05:37)


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

Offline

 

#949 2010-12-24 09:50:06

owetre18
Scratcher
Registered: 2009-07-01
Posts: 1000+

Re: Welcome to the OLD local block library!

I have some byob blocks

http://i.imgur.com/CtPtP.gif

Um, not the scripts yet, but if you want them I can get them at 11:00 EST. My cousin is coming over, so I have to get off soon.

Note about blocks: The velocity will not work without a forever. Maybe you can try to fix it, or someone else can. Not as good as you at blocks, but still, good enough.

Last edited by owetre18 (2010-12-24 09:53:25)

Offline

 

#950 2010-12-24 09:54:17

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

Re: Welcome to the OLD local block library!

owetre, you need to supply an image of the blocks that make up your custom blocks! Also a link to a sprite containing the block for each block is appreciated.

glide to random XY and all but ( ) of [list] are already shared and touching mouse and clicked are already blocks!


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

Offline

 

Board footer