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

#1301 2010-11-19 20:19:40

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

me450 wrote:

[request]

write [] to line () of file []

its like the write to file blocks but it writes to a certain line

also a create file []

you should check around. I made both of these already!

werent they for Panther though

Offline

 

#1302 2010-11-20 08:50:51

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

Re: Cool custom blocks in Scratch

How do you save a certain section?


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

Offline

 

#1303 2010-11-20 09:33:04

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

Re: Cool custom blocks in Scratch

me450 wrote:

johnnydean1 wrote:

me450 wrote:

[request]

write [] to line () of file []

its like the write to file blocks but it writes to a certain line

also a create file []

you should check around. I made both of these already!

werent they for Panther though

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


You can now reach me on Twitter @johnnydean1_

Offline

 

#1304 2010-11-20 18:21:38

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

me450 wrote:

johnnydean1 wrote:


you should check around. I made both of these already!

werent they for Panther though

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

ive tried just changing the $string$ to %s and the $number$ to %n  but i get errors when using them

Offline

 

#1305 2010-11-21 08:47:51

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

Re: Cool custom blocks in Scratch

Bobsterman wrote:

How could you add more keys to
<key[  ]pressed?>
?

I just got an ascii code translate thingy on google, but how do you edit it?


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

Offline

 

#1306 2010-11-21 08:56:39

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

Re: Cool custom blocks in Scratch

ScriptableScratchMorph asciiFor:
ScriptableScratchMorph keyNames


/* No comment */

Offline

 

#1307 2010-11-21 12:41:26

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

Re: Cool custom blocks in Scratch

11-16-01 wrote:

the sprite name block is made like this:
go to scriptablescratchmorph go to the control section then put this:

('sprite name' #r #name)

go to instance on the screen that pops up put this:

name
      ^ self objname

actually you need to capitalize the N in objName so it would be

   

Code:

name
      ^ self objName

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

 

#1308 2010-11-21 13:15:01

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

Re: Cool custom blocks in Scratch

legomany3448 wrote:

I just got an ascii code translate thingy on google, but how do you edit it?

go to http://scratch.mit.edu/projects/Pecola1/1429431 for a tutorial I made for that block.


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

 

#1309 2010-11-24 01:17:33

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

Re: Cool custom blocks in Scratch

johnnydean1 wrote:

me450 wrote:

johnnydean1 wrote:


you should check around. I made both of these already!

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?>

Offline

 

#1310 2010-11-24 09:07:33

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

Re: Cool custom blocks in Scratch

TheSuccessor wrote:

ScriptableScratchMorph asciiFor:
ScriptableScratchMorph keyNames

http://scratch.mit.edu/projects/Pecola1/1429431 that is if you want ASCII code. It is a tutorial for YOU

Last edited by Pecola1 (2010-11-24 09:08:14)


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

 

#1311 2010-11-24 09:10:16

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

Re: Cool custom blocks in Scratch

http://scratch.mit.edu/projects/Pecola1/1429431 this is a tutorial so you can add ASCII CODE!


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

 

#1312 2010-11-24 09:37:35

cheesycat501
Scratcher
Registered: 2010-08-17
Posts: 4

Re: Cool custom blocks in Scratch

How do I make the "looks 'blur'" effect?

Offline

 

#1313 2010-11-26 20:45:20

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Cool custom blocks in Scratch

So I was wondering... Where do you learn the code to code these blocks? I would really like to learn.


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#1314 2010-11-27 04:39:47

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

Re: Cool custom blocks in Scratch

coupdegrace wrote:

So I was wondering... Where do you learn the code to code these blocks? I would really like to learn.

i simply looked around at the existing blocks' code and took some stuff from it  smile

Offline

 

#1315 2010-11-27 11:58:44

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Cool custom blocks in Scratch

LS97 wrote:

coupdegrace wrote:

So I was wondering... Where do you learn the code to code these blocks? I would really like to learn.

i simply looked around at the existing blocks' code and took some stuff from it  smile

thank you, that's what i did too. But can you create a method, and if so, how?


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#1316 2010-11-27 12:46:11

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

Re: Cool custom blocks in Scratch

coupdegrace wrote:

So I was wondering... Where do you learn the code to code these blocks? I would really like to learn.

A tutorial to the language Scratch is written in (Squeak) can be found here.

Last edited by gbear605 (2010-11-27 12:47:16)


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

 

#1317 2010-11-28 14:16:00

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Cool custom blocks in Scratch

cheesycat501 wrote:

How do I make the "looks 'blur'" effect?

go to ScriptableScratchMorph, then looks ops. Go to graphic effects names and add somewhere in the parentheses

Code:

'blur'

if you put it in the right place, it should work automatically. You can also do this for 'pointillize' and 'saturation'.


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#1318 2010-11-28 17:58:47

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

Re: Cool custom blocks in Scratch

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.

Offline

 

#1319 2010-11-28 21:05:52

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Cool custom blocks in Scratch

i can, on request, post tutorials for the blocks "go forward ( ) layers", "add variable [ ]", "create list [ ]", and "repeat while < >"
go on, request away  big_smile


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#1320 2010-11-29 11:16:55

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

Re: Cool custom blocks in Scratch

coupdegrace wrote:

i can, on request, post tutorials for the blocks "go forward ( ) layers", "add variable [ ]", "create list [ ]", and "repeat while < >"
go on, request away  big_smile

reaaaally....

1. just edit the code in go back () layers to change from -1 to 1
2. addVariable:
3. addList: i think cant remember  hmm
4. the code's already there (in the scratchProcess)

tongue

Offline

 

#1321 2010-11-29 11:20:12

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

Re: Cool custom blocks in Scratch

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.

you cant really do that as the clicking raises an event and is not meant for boolean receivers. it's a bit like trying to nail something down with a mouse.

the best i can give you is the combination of these blocks:

[blocks]
<< <mouse down?> <and> <touching[ mouse  >>
[/blocks]

Offline

 

#1322 2010-11-29 14:54:39

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

Re: Cool custom blocks in Scratch

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

Last edited by subzerostig (2010-11-29 14:55:48)


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

 

#1323 2010-11-29 14:57:26

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Cool custom blocks in Scratch

How does the When GreenFLag Clicked show the green flag?

Offline

 

#1324 2010-11-29 17:23:58

coupdegrace
Scratcher
Registered: 2009-12-02
Posts: 42

Re: Cool custom blocks in Scratch

LS97 wrote:

2. addVariable:
3. addList: i think cant remember  hmm

actually, those don't really work. It's a bit more complex. And gimme a break! I'm JUST starting to edit blocks!  wink


[CENTER]http://www.nodiatis.com/pub/11.jpg[/CENTER]

Offline

 

#1325 2010-11-30 11:59:32

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

Re: Cool custom blocks in Scratch

ProgrammingFreak wrote:

How does the When GreenFLag Clicked show the green flag?

the block has a special drawing method. if you're really interested for that particular block, try looking in Scratch-Blocks StartEventHatMorph.

generally, blocks like the
[blocks]<turn cw(  )degrees>[/blocks]
use the method in
Scratch-Blocks -> CommandBlockMorph -> addCommandIcons
hope that helped  big_smile

Last edited by LS97 (2010-11-30 11:59:47)

Offline

 

Board footer