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

#1 2010-10-04 19:04:39

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

Scratch Stat Blocks!

The block rush system! There are gonna be a highway of blocks! A planet of blocks! Just post below, and the blocks will go certanly STAT! into the topic.
PLZ do not go what?? please. PLEASE. PLEASE!!!

operators
control

Last edited by zorket (2010-10-06 16:13:24)


Marzipan11 must learn to not spoil

Offline

 

#2 2010-10-04 19:08:42

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: Scratch Stat Blocks!

My posts and all of the other dude's posts were deleted.

Oh, great.

Good idea, but I thing there is already a thread for this...


-End Transmission-

Offline

 

#3 2010-10-04 19:32:24

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

Re: Scratch Stat Blocks!

iCode-747 wrote:

My posts and all of the other dude's posts were deleted.

Oh, great.

Good idea, but I thing there is already a thread for this...

Yes, there is one called the block library. This is the stat block highway.


Marzipan11 must learn to not spoil

Offline

 

#4 2010-10-04 20:18:19

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

Re: Scratch Stat Blocks!

Operators
(report []) by zorket

blockspec:

('report %s' #r #report: 'hello')

Code:

report: t1
^ t1

What it does: Reports it's contents.

(if <> then () else () by zorket

blockspec:

('if %b then %s else %s' #r #if:then:else:

Code:

if: t1 then: t2 else: t3
t1 ifTrue: [^ t2].
^ t3

What it does: Reports the first string if the boolean is true, the second if false.

<if <> then <> else <> by zorket

blockspec:

('if %b then %b else %b' #b #if:then:else:

Code:

if: t1 then: t2 else: t3
t1 ifTrue: [^ t2].
^ t3

What it does: Reports the second boolean if the first boolean is true, the second if false.

<true> by zorket

blockspec:

('true' #b #reportTrue)

Code:

reportTrue
^ true

What it does: Reports true.

<false> by zorket

blockspec:

('false' #b #reportFalse)

Code:

reportFalse
^ false

What it does: Reports false.

( (shuffle) (string) ) 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:

$T = t2 ifTrue: [^ ChoiceOrExpressionArgMorph new getOptionsSelector: #mixingNames;
choice: 'reverse'].

Scratch objects> scriptableScratchMorph> LOW then press class> otherOps:

mixingNames
    ^ #('lowercase' 'uppercase' 'reverse' 'shuffle' 'report' )

What it does: Reports the string by the effect in the dropdown.



back to menu

Last edited by zorket (2010-10-10 17:47:11)


Marzipan11 must learn to not spoil

Offline

 

#5 2010-10-05 19:54:41

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

Re: Scratch Stat Blocks!

Control
(get (^) by LS97

Blockspec:

('get %t' #r #getTime: 'date')

Code:

getTime: t1
    t1 = 'date' ifTrue: [^ Date today].
    t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
    t1 = 'time' ifTrue: [^ Time now].
    t1 = 'seconds' ifTrue: [^ Time now seconds].
    t1 = 'minutes' ifTrue: [^ Time now minutes].
    t1 = 'hours' ifTrue: [^ Time now hours].
    t1 = 'weekday' ifTrue: [^ Date today weekday].

Code for scratch blocks > command block morph > private > uncolordArgMorphFor: add a strip:

Code:

$t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames;
         choice: ''].

Scratch objects > scriptable scratch morph, other ops:

Code:

timeNames
    ^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )

What it does: Reports the date or time or short-date, or seconds, minutes, hours, or weekday. All just in a simple drop down. But it uses the computer time.
back to menu

Last edited by zorket (2010-10-10 17:46:47)


Marzipan11 must learn to not spoil

Offline

 

#6 2010-10-06 12:15:36

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

Re: Scratch Stat Blocks!

zorket wrote:

Control
(get (^) by zorket

Blockspec:

('get %t' #r #getTime: 'date')

Code:

getTime: t1
    t1 = 'date' ifTrue: [^ Date today].
    t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
    t1 = 'time' ifTrue: [^ Time now].
    t1 = 'seconds' ifTrue: [^ Time now seconds].
    t1 = 'minutes' ifTrue: [^ Time now minutes].
    t1 = 'hours' ifTrue: [^ Time now hours].
    t1 = 'weekday' ifTrue: [^ Date today weekday].

Code for scratch blocks > command block morph > private > uncolordArgMorphFor: replace all the code with:

Code:

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'].
    $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'].
    $t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames;
         choice: ''].
    $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'

Scratch objects > scriptable scratch morph, other ops:

Code:

timeNames
    ^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )

What it does: Reports the date or time or short-date, or seconds, minutes, hours, or weekday. All just in a simple drop down. But it uses the computer time.
back to menu

And have you given credit to its creator (LS97 I think)?


/* No comment */

Offline

 

#7 2010-10-06 12:20:40

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

Re: Scratch Stat Blocks!

the topic's name made me think it was going to be about blocks that read scratch stats!


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

Offline

 

#8 2010-10-06 12:22:57

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

Re: Scratch Stat Blocks!

sparks wrote:

the topic's name made me think it was going to be about blocks that read scratch stats!

Same here.


/* No comment */

Offline

 

#9 2010-10-06 12:47:36

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

Re: Scratch Stat Blocks!

TheSuccessor wrote:

And have you given credit to its creator (LS97 I think)?

Uh... Zorket submitted this block to me in my library under his name... is it done by someone else?


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

Offline

 

#10 2010-10-06 12:50:49

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Scratch Stat Blocks!

sparks wrote:

TheSuccessor wrote:

And have you given credit to its creator (LS97 I think)?

Uh... Zorket submitted this block to me in my library under his name... is it done by someone else?

I don'y know who orginaly made it, but I don't think zorket made the original.


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#11 2010-10-06 12:53:41

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

Re: Scratch Stat Blocks!

hm... I'll ask around  hmm  oh yes, if you're online, go onto google docs!


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

Offline

 

#12 2010-10-06 15:42:29

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

Re: Scratch Stat Blocks!

Sperry wrote:

sparks wrote:

TheSuccessor wrote:

And have you given credit to its creator (LS97 I think)?

Uh... Zorket submitted this block to me in my library under his name... is it done by someone else?

I don'y know who orginaly made it, but I don't think zorket made the original.

Oh, I forgot it really was by him. Sorry. Replaced zorket with LS97  hmm
I didn't even make the original!  yikes
SORRY, SPARKS!!
sad

Last edited by zorket (2010-10-06 17:53:23)


Marzipan11 must learn to not spoil

Offline

 

#13 2010-10-10 19:34:38

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

Re: Scratch Stat Blocks!

Blockz please Please PLEASE PLEASE. PLEASE!!!

Last edited by zorket (2010-10-10 19:34:48)


Marzipan11 must learn to not spoil

Offline

 

#14 2010-10-11 15:48:48

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

Re: Scratch Stat Blocks!

TheSuccessor wrote:

zorket wrote:

Control
(get (^) by zorket

Blockspec:

('get %t' #r #getTime: 'date')

Code:

getTime: t1
    t1 = 'date' ifTrue: [^ Date today].
    t1 = 'short date' ifTrue: [^ Date today printFormat: #(1 2 3 $- 2 2 )].
    t1 = 'time' ifTrue: [^ Time now].
    t1 = 'seconds' ifTrue: [^ Time now seconds].
    t1 = 'minutes' ifTrue: [^ Time now minutes].
    t1 = 'hours' ifTrue: [^ Time now hours].
    t1 = 'weekday' ifTrue: [^ Date today weekday].

Code for scratch blocks > command block morph > private > uncolordArgMorphFor: replace all the code with:

Code:

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'].
    $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'].
    $t = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #timeNames;
         choice: ''].
    $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'

Scratch objects > scriptable scratch morph, other ops:

Code:

timeNames
    ^ #('date' 'time' 'short date' 'seconds' 'minutes' 'hours' 'weekday' )

What it does: Reports the date or time or short-date, or seconds, minutes, hours, or weekday. All just in a simple drop down. But it uses the computer time.
back to menu

And have you given credit to its creator (LS97 I think)?

IT IS DEFINITLY POINTLESS TO REPLY TO A POST OF THE SECTION!!!!!!!!!!!!!!!!!!!!


Marzipan11 must learn to not spoil

Offline

 

Board footer