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

#926 2010-08-18 15:24:07

sonicjosh
Scratcher
Registered: 2007-10-28
Posts: 86

Re: Cool custom blocks in Scratch

pwiter wrote:

I got a new block
http://img831.imageshack.us/img831/1435/capturesc.jpg
Instance ops:

Code:

| dialogBox |
    dialogBox _ DialogBoxMorph new.
    dialogBox title: t1.
    dialogBox withButtonsForYes: false no: false okay: true cancel: false.
    dialogBox message: t2.
    dialogBox getUserResponse.

Blockspecs

Code:

('show dialog titled %s with contents %s' #- #showDialogTitle:Contents: 'info' 'hello')

Copyright pwitter 2010

COPYRIGHT!!! How could you have copyrighted it??? Or did you just say that so people wouldn't steal it? :s One or the other because copyrighting is harder than you think...

(P.S. Hope I don't sound angry!  tongue )

Last edited by sonicjosh (2010-08-18 15:25:02)


http://i35.tinypic.com/14yacn6.jpg
Need help with your mod? Visit Mod Central!

Offline

 

#927 2010-08-18 15:28:42

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

Re: Cool custom blocks in Scratch

LS97 wrote:

TheSuccessor wrote:

Can anybody explain the Execution Engine? It just seems to push and pop stack frames. Is pushing and popping the same thing JavaScript does to arrays?

that would be something nice ² explain. i never get it either.

nXIII?


/* No comment */

Offline

 

#928 2010-08-18 17:12:42

kinker
Scratcher
Registered: 2010-08-01
Posts: 100+

Re: Cool custom blocks in Scratch

Do you know how to make the set/change blur effect to/by n?  smile


Put in the weirdness: http://i54.tinypic.com/zl6fph.pnghttp://img821.imageshack.us/i/gobanim2.gif/kinker style! [url]http://internetometer.com/image/16724.png[/url]♬♫ 92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. ♫♪

Offline

 

#929 2010-08-19 08:24:14

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: Cool custom blocks in Scratch

sonicjosh wrote:

pwiter wrote:

I got a new block
http://img831.imageshack.us/img831/1435/capturesc.jpg
Instance ops:

Code:

| dialogBox |
    dialogBox _ DialogBoxMorph new.
    dialogBox title: t1.
    dialogBox withButtonsForYes: false no: false okay: true cancel: false.
    dialogBox message: t2.
    dialogBox getUserResponse.

Blockspecs

Code:

('show dialog titled %s with contents %s' #- #showDialogTitle:Contents: 'info' 'hello')

Copyright pwitter 2010

COPYRIGHT!!! How could you have copyrighted it??? Or did you just say that so people wouldn't steal it? :s One or the other because copyrighting is harder than you think...

(P.S. Hope I don't sound angry!  tongue )

Try saying that to ls97  smile

Last edited by pwiter (2010-08-19 08:24:50)


http://i.imgur.com/YBeXc.png

Offline

 

#930 2010-08-19 22:43:04

Talikitty
Scratcher
Registered: 2010-03-21
Posts: 1

Re: Cool custom blocks in Scratch

i need help from my sister to do that, shes good at codes

Offline

 

#931 2010-08-20 05:52:54

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

kinker wrote:

Do you know how to make the set/change blur effect to/by n?  smile

that's explained somewhere in the first 3 pages  smile

Offline

 

#932 2010-08-23 16:18:07

kinker
Scratcher
Registered: 2010-08-01
Posts: 100+

Re: Cool custom blocks in Scratch

LS97 wrote:

randalpik wrote:

I can't figure out how to make the Graphic effect reporter block... can someone help?

Here it is just quickly. i've got hw to do now!

Code:

getEffect: t1 
    filterPack ifNil: [^ 0].
    'blur' = t1 ifTrue: [^ filterPack blur].
    'brightness' = t1 ifTrue: [^ filterPack brightnessShift].
    'fisheye' = t1 ifTrue: [^ filterPack fisheye].
    'color' = t1 ifTrue: [^ filterPack hueShift].
    'colour' = t1 ifTrue: [^ filterPack hueShift].
    'mosaic' = t1 ifTrue: [^ filterPack mosaicCount].
    'pixelate' = t1 ifTrue: [^ filterPack pixelateCount].
    'pointillize' = t1 ifTrue: [^ filterPack pointillizeSize].
    'saturation' = t1 ifTrue: [^ filterPack saturationShift].
    'transparency' = t1 | ('ghost' = t1) ifTrue: [^ self transparency].
    'whirl' = t1 ifTrue: [^ filterPack whirl]

Hope it helps.

What about the block spec? mad


Put in the weirdness: http://i54.tinypic.com/zl6fph.pnghttp://img821.imageshack.us/i/gobanim2.gif/kinker style! [url]http://internetometer.com/image/16724.png[/url]♬♫ 92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. ♫♪

Offline

 

#933 2010-08-23 16:23:30

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Cool custom blocks in Scratch

kinker wrote:

LS97 wrote:

randalpik wrote:

I can't figure out how to make the Graphic effect reporter block... can someone help?

Here it is just quickly. i've got hw to do now!

Code:

getEffect: t1 
    filterPack ifNil: [^ 0].
    'blur' = t1 ifTrue: [^ filterPack blur].
    'brightness' = t1 ifTrue: [^ filterPack brightnessShift].
    'fisheye' = t1 ifTrue: [^ filterPack fisheye].
    'color' = t1 ifTrue: [^ filterPack hueShift].
    'colour' = t1 ifTrue: [^ filterPack hueShift].
    'mosaic' = t1 ifTrue: [^ filterPack mosaicCount].
    'pixelate' = t1 ifTrue: [^ filterPack pixelateCount].
    'pointillize' = t1 ifTrue: [^ filterPack pointillizeSize].
    'saturation' = t1 ifTrue: [^ filterPack saturationShift].
    'transparency' = t1 | ('ghost' = t1) ifTrue: [^ self transparency].
    'whirl' = t1 ifTrue: [^ filterPack whirl]

Hope it helps.

What about the block spec? mad

it should be
Source
('graphic effect %s'         r        getEffect: 'blur')
Not source
('graphic effect %s'   #r  #getEffect: 'blur')


You can now reach me on Twitter @johnnydean1_

Offline

 

#934 2010-08-23 16:28:21

kinker
Scratcher
Registered: 2010-08-01
Posts: 100+

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

kinker wrote:

LS97 wrote:


Here it is just quickly. i've got hw to do now!

Code:

getEffect: t1 
    filterPack ifNil: [^ 0].
    'blur' = t1 ifTrue: [^ filterPack blur].
    'brightness' = t1 ifTrue: [^ filterPack brightnessShift].
    'fisheye' = t1 ifTrue: [^ filterPack fisheye].
    'color' = t1 ifTrue: [^ filterPack hueShift].
    'colour' = t1 ifTrue: [^ filterPack hueShift].
    'mosaic' = t1 ifTrue: [^ filterPack mosaicCount].
    'pixelate' = t1 ifTrue: [^ filterPack pixelateCount].
    'pointillize' = t1 ifTrue: [^ filterPack pointillizeSize].
    'saturation' = t1 ifTrue: [^ filterPack saturationShift].
    'transparency' = t1 | ('ghost' = t1) ifTrue: [^ self transparency].
    'whirl' = t1 ifTrue: [^ filterPack whirl]

Hope it helps.

What about the block spec? mad

it should be
Source
('graphic effect %s'         r        getEffect: 'blur')
Not source
('graphic effect %s'   #r  #getEffect: 'blur')

Never mind.


Put in the weirdness: http://i54.tinypic.com/zl6fph.pnghttp://img821.imageshack.us/i/gobanim2.gif/kinker style! [url]http://internetometer.com/image/16724.png[/url]♬♫ 92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. ♫♪

Offline

 

#935 2010-08-23 16:56:28

kinker
Scratcher
Registered: 2010-08-01
Posts: 100+

Re: Cool custom blocks in Scratch

Whats the beep block spec and the code to work the beep block?


Put in the weirdness: http://i54.tinypic.com/zl6fph.pnghttp://img821.imageshack.us/i/gobanim2.gif/kinker style! [url]http://internetometer.com/image/16724.png[/url]♬♫ 92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. ♫♪

Offline

 

#936 2010-08-24 04:35:31

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

kinker wrote:

Whats the beep block spec and the code to work the beep block?

spec: ('beep' - doBeep)
method:
doBeep
     self beep

Offline

 

#937 2010-08-24 08:34:44

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

kinker wrote:

What about the block spec? mad

it should be
Source
('graphic effect %s'         r        getEffect: 'blur')
Not source
('graphic effect %s'   #r  #getEffect: 'blur')

%g is better than %s. It gives a menu with the graphic effect names.


/* No comment */

Offline

 

#938 2010-08-24 08:50:27

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Cool custom blocks in Scratch

TheSuccessor wrote:

johnnydean1 wrote:

kinker wrote:

What about the block spec? mad

it should be
Source
('graphic effect %s'         r        getEffect: 'blur')
Not source
('graphic effect %s'   #r  #getEffect: 'blur')

%g is better than %s. It gives a menu with the graphic effect names.

I know I was tring to rember what the graphic effects names letter was!


You can now reach me on Twitter @johnnydean1_

Offline

 

#939 2010-08-24 11:47:15

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

TheSuccessor wrote:

johnnydean1 wrote:


it should be
Source
('graphic effect %s'         r        getEffect: 'blur')
Not source
('graphic effect %s'   #r  #getEffect: 'blur')

%g is better than %s. It gives a menu with the graphic effect names.

I know I was tring to rember what the graphic effects names letter was!

if you have any doubts next time, first of all there's a list on the first page and you can always check under commandblockmorph's uncoloredargmorphfor: method  smile

Offline

 

#940 2010-08-24 12:25:54

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Cool custom blocks in Scratch

LS97 wrote:

johnnydean1 wrote:

TheSuccessor wrote:

%g is better than %s. It gives a menu with the graphic effect names.

I know I was tring to rember what the graphic effects names letter was!

if you have any doubts next time, first of all there's a list on the first page and you can always check under commandblockmorph's uncoloredargmorphfor: method  smile

Ok thanks, but I was working from memory!


You can now reach me on Twitter @johnnydean1_

Offline

 

#941 2010-08-24 17:01:36

kinker
Scratcher
Registered: 2010-08-01
Posts: 100+

Re: Cool custom blocks in Scratch

LS97 wrote:

kinker wrote:

Whats the beep block spec and the code to work the beep block?

spec: ('beep' - doBeep)
method:
doBeep
     self beep

Not much of a beep but thanks! I have 6 blocks now!  smile


Put in the weirdness: http://i54.tinypic.com/zl6fph.pnghttp://img821.imageshack.us/i/gobanim2.gif/kinker style! [url]http://internetometer.com/image/16724.png[/url]♬♫ 92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. ♫♪

Offline

 

#942 2010-08-24 17:54:20

kinker
Scratcher
Registered: 2010-08-01
Posts: 100+

Re: Cool custom blocks in Scratch

TheSuccessor wrote:

Joeman592 wrote:

roger- wrote:

here's a good exponent block. put it under operators.

Code:

exp: t1 raisedTo: t2 
    | t3 |
    t3 _ t1 raisedTo: t2.
    ^ t3

But there isn't an operators... and if there is PLEASE TELL ME CUZ I CANT FIND IT! please? Also, please tell me if it goes in string.

Operators is the new name for numbers in 1.4

What about the block spec? neutral


Put in the weirdness: http://i54.tinypic.com/zl6fph.pnghttp://img821.imageshack.us/i/gobanim2.gif/kinker style! [url]http://internetometer.com/image/16724.png[/url]♬♫ 92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. ♫♪

Offline

 

#943 2010-08-24 20:28:22

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

Re: Cool custom blocks in Scratch

thanks!
<change{ great }by( 400000000000000000


Marzipan11 must learn to not spoil

Offline

 

#944 2010-08-24 20:36:16

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Cool custom blocks in Scratch

kinker wrote:

TheSuccessor wrote:

Joeman592 wrote:


But there isn't an operators... and if there is PLEASE TELL ME CUZ I CANT FIND IT! please? Also, please tell me if it goes in string.

Operators is the new name for numbers in 1.4

What about the block spec?=|

It would be: ('%n ^ %n' #r #exp:raisedTo:)


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#945 2010-08-25 09:09:55

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

Re: Cool custom blocks in Scratch

I want the challenge for time block!


Marzipan11 must learn to not spoil

Offline

 

#946 2010-08-25 10:04:45

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

Re: Cool custom blocks in Scratch

what is the 'i recieve block?


Marzipan11 must learn to not spoil

Offline

 

#947 2010-08-25 10:15:48

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Cool custom blocks in Scratch

zorket wrote:

I want the challenge for time block!

i already posted it somewhere. can't find it anymore.
try adapting this one:
at bottom of this page

Offline

 

#948 2010-08-25 18:34:45

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

Re: Cool custom blocks in Scratch

LS97 wrote:

The string control blocks
these are requested blocks, so i'll get to it immidiately.
i can't really guarantee 'cause this is off the top of my head...

THE REVERSE BLOCK
add to blockSpecs under operators: ('reverse %s' #r #rev:)

add to code under string ops:

Code:

rev: t1
^ t1 reversed

THE LOWERCASE/UPPERCASE
please note that i put this once only (for lowercase). just change all the 'lower' to 'upper' for uppercase. (duh)

put in blockSpecs: ('%s lowercase' #r #lowercase:)

put in code under string ops:

Code:

lowercase: t1
^ t1 asLowercase

there you go!

I needed this! Thank you!   lol

<<  <not>  >>

Last edited by zorket (2010-08-25 18:36:03)


Marzipan11 must learn to not spoil

Offline

 

#949 2010-08-26 06:42:50

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Cool custom blocks in Scratch

pwiter wrote:

I got a new block
http://img831.imageshack.us/img831/1435/capturesc.jpg
Instance ops:

Code:

| dialogBox |
    dialogBox _ DialogBoxMorph new.
    dialogBox title: t1.
    dialogBox withButtonsForYes: false no: false okay: true cancel: false.
    dialogBox message: t2.
    dialogBox getUserResponse.

Blockspecs

Code:

('show dialog titled %s with contents %s' #- #showDialogTitle:Contents: 'info' 'hello')

Copyright pwitter 2010

*Laughs* Wow.

1: You can't copyright something that was made before you, and probably where you got it from.

2: I see no credit to Scratch or Squeak

3: You can't copyright it because you never asked the Scratch team. It's as if you are claiming the "building blocks" programming, the block process, and the dialog process.

4: You didn't even wright the copyright notice correctly.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#950 2010-08-26 09:18:44

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Cool custom blocks in Scratch

hm... pwnt?  big_smile   big_smile 
i honestly think that was to scare people from using 'his'* block.

*=not his


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

Board footer