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

#1 2010-05-31 14:23:54

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

Make a block to do nothing

Ok I need a block for my mod that does nothing. Yes when its used Scratch will pass over it as if it were not there. Anyone know how?

EDIT:
('do nothing' #- #yourself)

yourself is already defined.

Last edited by johnnydean1 (2010-07-12 02:57:33)


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-05-31 14:37:31

krackers
Scratcher
Registered: 2010-05-08
Posts: 61

Re: Make a block to do nothing

Why... simply don't use any block.

Offline

 

#3 2010-05-31 14:40:53

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

Re: Make a block to do nothing

Yes but I need to. I would like to use it in a mod.


You can now reach me on Twitter @johnnydean1_

Offline

 

#4 2010-05-31 14:48:14

krackers
Scratcher
Registered: 2010-05-08
Posts: 61

Re: Make a block to do nothing

It would be useless!!!!

Offline

 

#5 2010-05-31 14:56:13

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

Re: Make a block to do nothing

Thats the point!


You can now reach me on Twitter @johnnydean1_

Offline

 

#6 2010-06-01 19:42:44

Scratchguy3
Scratcher
Registered: 2010-02-07
Posts: 29

Re: Make a block to do nothing

The code would be:

Code:

("block name" #- #-)

http://ev.carsoncheng.com/dropbox/scratchguy3-forum-sig.png

Offline

 

#7 2010-06-01 20:37:50

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: Make a block to do nothing

in blockspecs:

Code:

('do nothing' #- #-)

Offline

 

#8 2010-06-01 20:39:45

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Make a block to do nothing

Billybob-Mario wrote:

in blockspecs:

Code:

('do nothing' #- #-)

Didn't the person above just say that?


nXIII

Offline

 

#9 2010-06-01 20:49:32

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

Re: Make a block to do nothing

Billybob-Mario wrote:

in blockspecs:

Code:

('do nothing' #- #-)

this doesn't work...


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

Offline

 

#10 2010-06-01 21:45:41

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Make a block to do nothing

Why would you need it? Just don't put any block, as krackers said.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#11 2010-06-01 22:02:56

krackers
Scratcher
Registered: 2010-05-08
Posts: 61

Re: Make a block to do nothing

There is no circumstance where you would need a block that doesn't do anything...

Offline

 

#12 2010-06-02 02:35:49

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Make a block to do nothing

Maybe it's for something like the old comment block in the Scratch 1.2 beta.  hmm


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#13 2010-06-02 03:03:48

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

Re: Make a block to do nothing

Well I will tell you what its for.

I have made a new tab (pen control) and called it hacked blocks. (To keep them seperate) And a Second tab called Motor Blocks. Now what I have done is moved all the Motor Blocks to the Motor tab and put My hacked blocks in the hacked tab.

Heres the clever bit. Before you could choose to hide/show the motor blocks, well I altered it and you can hide/show the hacked blocks.

Here is why I need the block:

I am spliting up my hacked blocks in to diffrent types, e.g lets use mesh

So I want it like this
MESH (A block that does nothing)
All my hacked mesh blocks

CONTROL (A block that does nothing)
All my hacked contol blocks


And so on.


You can now reach me on Twitter @johnnydean1_

Offline

 

#14 2010-06-02 07:05:14

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

Re: Make a block to do nothing

Scratchguy3 wrote:

The code would be:

Code:

("block name" #- #-)

Good... But you missed a big something.

CLASS:

Code:

('block name' #- #doNothing)

INSTANCE:

Code:

doNothing
     ^self

NOTE: If you are lazy, and decided to copy and paste, replace the five spaces with one TAB in the instance code.


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

Offline

 

#15 2010-06-02 09:09:27

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

Re: Make a block to do nothing

Yay!


You can now reach me on Twitter @johnnydean1_

Offline

 

#16 2010-06-02 17:33:23

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Make a block to do nothing

just use ('do nothing' #- #yourself)
It's a built-in method.


nXIII

Offline

 

#17 2010-06-02 17:38:46

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

Re: Make a block to do nothing

Thank you!


You can now reach me on Twitter @johnnydean1_

Offline

 

#18 2010-06-03 17:26:24

bendad
Scratcher
Registered: 2008-06-14
Posts: 100+

Re: Make a block to do nothing

ooh, a block that does nothing!


Hi!  big_smile
Good to see you. (Even if I don't know you  wink  )

Offline

 

#19 2010-06-03 19:43:15

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Make a block to do nothing

Oh, jd1: I just remembered why you wanted this and you might want to consider making a custom block page, so you can put "plain" strings in instead of blocks as dividers.


nXIII

Offline

 

#20 2010-06-04 03:19:21

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

Re: Make a block to do nothing

Ok I get what your saying, but could you explain something. On the sensing tab, you have a line seperating the last 2 blocks from the rest. The code for this is #~ but this can only be done on the sensing tab. Could you show me how to make one to work on all tabs.


You can now reach me on Twitter @johnnydean1_

Offline

 

#21 2010-06-04 15:04:04

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Make a block to do nothing

johnnydean1 wrote:

Ok I get what your saying, but could you explain something. On the sensing tab, you have a line seperating the last 2 blocks from the rest. The code for this is #~ but this can only be done on the sensing tab. Could you show me how to make one to work on all tabs.

Look at ScriptableScratchMorph's viewerPageForCategory: (in the category 'blocks').
You might want to add a line such as

(blockOrSym = #=) ifTrue: [
                    y _ y + 7.
                    bin addMorph: ((ImageMorph new form: (ScratchFrameMorph skinAt: #connector)) position: x@y).
                    y _ y + 20]  "insert a divider image"

near the other similar-looking ones. This one takes "=" as the symbol and puts the divider image in.

EDIT: AUGH RANDOM SMILEY FACE IN THE SMALLTALK! (fixed)

Last edited by nXIII (2010-06-04 15:04:33)


nXIII

Offline

 

#22 2010-06-17 14:58:40

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Make a block to do nothing

I've been wanting this for a while


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#23 2010-06-17 15:22:03

Aidan
Scratcher
Registered: 2007-06-15
Posts: 1000+

Re: Make a block to do nothing

henley wrote:

Scratchguy3 wrote:

The code would be:

Code:

("block name" #- #-)

Good... But you missed a big something.

CLASS:

Code:

('block name' #- #doNothing)

INSTANCE:

Code:

doNothing
     ^self

NOTE: If you are lazy, and decided to copy and paste, replace the five spaces with one TAB in the instance code.

How do I get into the instance for it?[/BlockspecsN00b]

Last edited by Aidan (2010-06-17 15:22:31)

Offline

 

#24 2010-06-17 15:59:03

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

Re: Make a block to do nothing

nXIII wrote:

johnnydean1 wrote:

Ok I get what your saying, but could you explain something. On the sensing tab, you have a line seperating the last 2 blocks from the rest. The code for this is #~ but this can only be done on the sensing tab. Could you show me how to make one to work on all tabs.

Look at ScriptableScratchMorph's viewerPageForCategory: (in the category 'blocks').
You might want to add a line such as

(blockOrSym = # smile  ifTrue: [
                    y _ y + 7.
                    bin addMorph: ((ImageMorph new form: (ScratchFrameMorph skinAt: #connector)) position: x@y).
                    y _ y + 20]  "insert a divider image"

near the other similar-looking ones. This one takes "=" as the symbol and puts the divider image in.

EDIT: AUGH RANDOM SMILEY FACE IN THE SMALLTALK! (fixed)

sorry, but that doesn't quite work. i can replace most of the variables, but what is binsupposed to be?

Offline

 

#25 2010-06-17 17:25:15

Aidan
Scratcher
Registered: 2007-06-15
Posts: 1000+

Re: Make a block to do nothing

Re-re-re-REPOST!

Aidan wrote:

How do I get into the instance for it?[/BlockspecsN00b]

Offline

 

Board footer