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

#1326 2010-11-30 16:42:22

-GizzardGulp-
Scratcher
Registered: 2010-03-05
Posts: 100+

Re: Cool custom blocks in Scratch

can you upload projects using these to the website and have other people view the projects normally without having to have these modifications?


http://i1118.photobucket.com/albums/k607/Max_Levine/SnoutmolStudios.png

Offline

 

#1327 2010-11-30 16:45:35

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

Re: Cool custom blocks in Scratch

me450 wrote:

johnnydean1 wrote:

me450 wrote:


werent they for Panther though

Panther to Scratch is easy to covert. I'm not explaining it but im sure LS97 or Sparks would!

all of them work except for <file exists?>

Thats as it uses Panther only functions.


You can now reach me on Twitter @johnnydean1_

Offline

 

#1328 2010-11-30 23:24:44

360mta
New Scratcher
Registered: 2010-11-20
Posts: 4

Re: Cool custom blocks in Scratch

subzerostig wrote:

360mta wrote:

Can you make a block that basically says:
"when sprite# is clicked" but is a boolean(diamond)?
-------
So far I got the code for blockspecs

Code:

 ('when %m clicked' #b)

...but I can;t figure the method or which opps it belongs to.

I can't help with the code, as I am not an expert in coding.
However your block code is wrong
Replaceit with this:

Code:

('%m clicked?' #b #othersprite:)

Only problem is that it has a checkbox next to it and you can select the mousepointer.
But I don't know why or how to stop that
hmm   hmm   hmm   hmm   hmm   hmm   hmm   hmm   hmm   hmm

Thanks...this problem has been bothering me for a while.
The problem being that one Sprite can't directly control another...but thanks for the code and the suggestion LS97.
I usually program in C++ and have a lot more elbow room...  sad

Offline

 

#1329 2010-12-01 15:53:23

legomany3448
Scratcher
Registered: 2010-08-30
Posts: 36

Re: Cool custom blocks in Scratch

LS97 wrote:

Aidan wrote:

I have another problem. How do I 'save' the changes?

that's something i didnt include in my tutorial, thanks for reminding me!
Shift-click the R again, and click 'save image for end-user'. then click yes.

It wouldn't work for me.


¿uʍop-ǝpısdn pɐǝɹ noʎ uɐɔ
Click here to get EPIC custom blocks on Scratch!

Offline

 

#1330 2010-12-01 20:44:50

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

Re: Cool custom blocks in Scratch

I am trying to make a [Draw square] block. Here my current code:

Code:

drawSquare
    self putPenUp.
    self referencePosition: -100 @ 100.
    self penDown.
    self referencePosition: 100 @ 100.
    self referencePosition: 100 @ -100.
    self referencePosition: -100 @ -100.
    self referencePosition: -100 @ 100.
    self putPenUp

This code doesn't seem to work. Maybe try and stretch it's activation out a little?


Marzipan11 must learn to not spoil

Offline

 

#1331 2010-12-02 01:27:26

pen13
Scratcher
Registered: 2010-08-27
Posts: 100+

Re: Cool custom blocks in Scratch

me450 wrote:

[Tutorial - Compile to exe with custom blocks]
1. Download latest BYOB
2. go to BYOB folder
3. Look for BYOB Development.BAT
4. change shortcut to open that file
5. open BYOB via shortcut of batch file
6. Shift click edit
7. turn fill screen off
8. add all your custom blocks and use BYOBS compiler to compile your projects

can not find  BYOB Development.BAT


http://womrealms.com/char.php?nomimg1:3ri855a
pen13 http://blocks.scratchr.org/API.php?user=pen13&amp;action=onlineStatus green= online gray=offline

Offline

 

#1332 2010-12-02 01:46:49

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

pen13 wrote:

me450 wrote:

[Tutorial - Compile to exe with custom blocks]
1. Download latest BYOB
2. go to BYOB folder
3. Look for BYOB Development.BAT
4. change shortcut to open that file
5. open BYOB via shortcut of batch file
6. Shift click edit
7. turn fill screen off
8. add all your custom blocks and use BYOBS compiler to compile your projects

can not find  BYOB Development.BAT

in C:/BYOB  ?

Offline

 

#1333 2010-12-02 02:10:27

subzerostig
Scratcher
Registered: 2010-09-08
Posts: 100+

Re: Cool custom blocks in Scratch

zorket wrote:

I am trying to make a [Draw square] block. Here my current code:

Code:

drawSquare
    self putPenUp.
    self referencePosition: -100 @ 100.
    self penDown.
    self referencePosition: 100 @ 100.
    self referencePosition: 100 @ -100.
    self referencePosition: -100 @ -100.
    self referencePosition: -100 @ 100.
    self putPenUp

This code doesn't seem to work. Maybe try and stretch it's activation out a little?

Yeah, I tried to do this to draw a rectangle. I used variables (a.k.a. t1, t2, t3, t4)
But it doesn't work


There are 10 types of people people in this world, those that understand binary and those that do not: My latest Project: Present catcher V2                          06/12/2012

Offline

 

#1334 2010-12-02 16:02:23

pen13
Scratcher
Registered: 2010-08-27
Posts: 100+

Re: Cool custom blocks in Scratch

me450 wrote:

pen13 wrote:

me450 wrote:

[Tutorial - Compile to exe with custom blocks]
1. Download latest BYOB
2. go to BYOB folder
3. Look for BYOB Development.BAT
4. change shortcut to open that file
5. open BYOB via shortcut of batch file
6. Shift click edit
7. turn fill screen off
8. add all your custom blocks and use BYOBS compiler to compile your projects

can not find  BYOB Development.BAT

in C:/BYOB  ?

what is C cdrive  hmm

Last edited by pen13 (2010-12-02 16:34:49)


http://womrealms.com/char.php?nomimg1:3ri855a
pen13 http://blocks.scratchr.org/API.php?user=pen13&amp;action=onlineStatus green= online gray=offline

Offline

 

#1335 2010-12-02 16:33:41

pen13
Scratcher
Registered: 2010-08-27
Posts: 100+

Re: Cool custom blocks in Scratch

me450 wrote:

pen13 wrote:

me450 wrote:

[Tutorial - Compile to exe with custom blocks]
1. Download latest BYOB
2. go to BYOB folder
3. Look for BYOB Development.BAT
4. change shortcut to open that file
5. open BYOB via shortcut of batch file
6. Shift click edit
7. turn fill screen off
8. add all your custom blocks and use BYOBS compiler to compile your projects

can not find  BYOB Development.BAT

in C:/BYOB  ?

now i know here cdrive is but i still cornt find byob in cdrive

Last edited by pen13 (2010-12-02 16:35:33)


http://womrealms.com/char.php?nomimg1:3ri855a
pen13 http://blocks.scratchr.org/API.php?user=pen13&amp;action=onlineStatus green= online gray=offline

Offline

 

#1336 2010-12-02 20:20:44

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: Cool custom blocks in Scratch

How about this block:

EDIT: It's an IP address block.

Code:

showNetworkAddressBlock
    | t1 t2 t3 |
    Socket initializeNetwork.
    t1 _ NetNameResolver localHostAddress.
    t2 _ nil.
    t3 _ NetNameResolver stringFromAddress: t1.
    (t2 notNil and: [t2 ~= t1])
        ifTrue: [t3 _ t3 , String cr , 'Internet:   ' , (NetNameResolver stringFromAddress: t2)].
    ^ t3

BlockSpec:

('Ip adress' #r #showNetworkAddressBlock)

Last edited by gbear605 (2010-12-02 20:21:37)


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#1337 2010-12-03 03:45:59

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

pen13 wrote:

me450 wrote:

pen13 wrote:


can not find  BYOB Development.BAT

in C:/BYOB  ?

what is C cdrive  hmm

Yes

Offline

 

#1338 2010-12-03 03:47:07

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

pen13 wrote:

me450 wrote:

pen13 wrote:

can not find  BYOB Development.BAT

in C:/BYOB  ?

now i know here cdrive is but i still cornt find byob in cdrive

try to work out where you installed it to

Offline

 

#1339 2010-12-03 17:30:49

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

Re: Cool custom blocks in Scratch

Ur taking attention off my block.


Marzipan11 must learn to not spoil

Offline

 

#1340 2010-12-03 17:45:35

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

Re: Cool custom blocks in Scratch

me450 wrote:

pen13 wrote:

me450 wrote:


in C:/BYOB  ?

what is C cdrive  hmm

Yes

Not so appropriate 1337th post.  tongue


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

Offline

 

#1341 2010-12-03 17:49:55

RocksAndFire
Scratcher
Registered: 2010-04-17
Posts: 1000+

Re: Cool custom blocks in Scratch

bbbeb wrote:

me450 wrote:

pen13 wrote:


what is C cdrive  hmm

Yes

Not so appropriate 1337th post.  tongue

lol

Offline

 

#1342 2010-12-03 18:38:55

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

Re: Cool custom blocks in Scratch

RocksAndFire wrote:

bbbeb wrote:

me450 wrote:


Yes

Not so appropriate 1337th post.  tongue

lol

^ spam!
Anyways, i need a <if touching sprite,bounce> 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

 

#1343 2010-12-04 03:17:26

me450
Scratcher
Registered: 2009-03-31
Posts: 56

Re: Cool custom blocks in Scratch

kinker wrote:

RocksAndFire wrote:

bbbeb wrote:

Not so appropriate 1337th post.  tongue

lol

^ spam!
Anyways, i need a <if touching sprite,bounce> block.

im working on it

EDIT

just use my block

Code:

bounce
    self rotationDegrees: rotationDegrees + 180

Code:

('bounce' #- #bounce)

and use it in a if block with a <touching []?> block

so [if?<touching []?>]
    [][Bounce]
    [               ]

Last edited by me450 (2010-12-04 03:36:20)

Offline

 

#1344 2010-12-04 05:31:02

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

Re: Cool custom blocks in Scratch

me450 wrote:

kinker wrote:

RocksAndFire wrote:


lol

^ spam!
Anyways, i need a <if touching sprite,bounce> block.

im working on it

EDIT

just use my block

Code:

bounce
    self rotationDegrees: rotationDegrees + 180

Code:

('bounce' #- #bounce)

and use it in a if block with a <touching []?> block

so [if?<touching []?>]
    [][Bounce]
    [               ]

not the most efficient bouncing method. but it will do for now while i make a good one for bingo 1.4

Offline

 

#1345 2010-12-04 13:04:57

jonzo
Scratcher
Registered: 2008-07-25
Posts: 76

Re: Cool custom blocks in Scratch

LS97 wrote:

Aidan wrote:

I have another problem. How do I 'save' the changes?

that's something i didnt include in my tutorial, thanks for reminding me!
Shift-click the R again, and click 'save image for end-user'. then click yes.

but then it says "changes have not been saved. it is ok to cancel those changes?"


⅃ O L

Offline

 

#1346 2010-12-04 18:31:58

piisawesome123
Scratcher
Registered: 2010-05-03
Posts: 6

Re: Cool custom blocks in Scratch

You can get sprite-specific blocks (Motion, Looks, etc.) by instead of clicking ScriptableScratchMorph, click ScriptableSpriteMorph, then class, then blockSpecs, then BlockSpecs again. You now can access motion and looks blocks. Hope this helps.  wink

Offline

 

#1347 2010-12-05 08:44:49

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

Re: Cool custom blocks in Scratch

scimonster wrote:

have you made any custom blocks in scratch?
have you made projects with them?
are you annoyed that you are the only one who can run them?
do you wish you could share those projects?

now you can!   smile

put a link to the project here, along with the blockspecs and coding for the blocks

isn't it great that you can do something with these?

Offline

 

#1348 2010-12-05 19:12:20

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

Re: Cool custom blocks in Scratch

Code:

drawSquare
    self putPenUp.
    self referencePosition: -100 @ 100.
    self penDown.
    self referencePosition: 100 @ 100.
    self referencePosition: 100 @ -100.
    self referencePosition: -100 @ -100.
    self referencePosition: -100 @ 100.
    self putPenUp

Needs to be fixed to make [draw square].


Marzipan11 must learn to not spoil

Offline

 

#1349 2010-12-07 10:03:21

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

Re: Cool custom blocks in Scratch

can someone make the method for this.  blockspecs:

Code:

('%Y list %L' #- #orderList)

with %Y being a new dropdown menu:

Code:

    $Y = t2 ifTrue: [^ ChoiceArgMorph new getOptionsSelector: #listOrdering; choice: 'alphabetize'].

and the choices:

Code:

listOrdering
    ^ #('alphabetize' 'reverse' 'shuffle' )

all i need is it to work.  it does the dropdown menu for alphabetize, the list menu, just not doing anything when clicked.


EDIT: i'm trying this code:

Code:

orderList: t1 list: t2 
    | t3 |
    t3 _ t1 t3 = 'alphabetize' ifTrue: [t2 alphabeticalMorphMenu].
    t3 = 'reverse' ifTrue: [t2 reversed].
    t3 = 'shuffle' ifTrue: [t2 shuffled].
    ^ 'Error!'

its not coming out quite right...

Last edited by scimonster (2010-12-08 11:03:47)

Offline

 

#1350 2010-12-07 13:40:14

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

Re: Cool custom blocks in Scratch

i am now trying to make a ((color^) effect of (sprite1^))[/blocks] reporter.
i put in the line of code

Code:

    $A = t2 ifTrue: [^ ChoiceArgMorph new choice: 'color';
         menuSelector: #attributeEffectNames].

match it with

Code:

attributeEffectNames
    ^ #('color' 'fisheye' 'whirl' 'pixelate' 'mosaic' 'brightness' 'ghost') collect: [:t1 | t1]

i have the blockspecs as

Code:

('%A effect of %m' #r #getAttributeEffect:)

and the method as

Code:

getAttributeEffect: t1 
    | t2 |
    (vars includesKey: t1)
        ifTrue: [^ vars at: t1].
    t2 _ t1 localized.
    'blur' = t2 ifTrue: [^ self blur].
    'brightness' localized = t2 ifTrue: [^ self brightnessShift].
    'fisheye' localized = t2 ifTrue: [^ self fisheye].
    'color' localized = t2 ifTrue: [^ self hueShift].
    'colour' localized = t2 ifTrue: [^ self hueShift].
    'mosaic' localized = t2 ifTrue: [^ self mosaicCount].
    'pixelate' localized = t2 ifTrue: [^ self pixelateCount].
    'pointillize' localized = t2 ifTrue: [^ self pointillizeSize].
    'saturation' localized = t2 ifTrue: [^ self saturationShift].
    'transparency' localized = t2 | ('ghost' localized = t2) ifTrue: [^ self transparency].
    'whirl' localized = t2 ifTrue: [^ self whirl]

i copied that from the regular attributes and the color effect reporter that i found here.  when i click on sensing, it comes up with an error message:

Message not understood: menuSelector:

what should i do!?!?!  HELP!

Last edited by scimonster (2010-12-08 10:56:41)

Offline

 

Board footer