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

#26 2008-05-07 19:00:04

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Build a block (procedures)

likegames wrote:

forget block maker, edit it with the source code!

I've tried, but can't get the code up and working. I download it and all, but where is it located for Mac's!!!???


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#27 2008-05-08 02:19:15

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Build a block (procedures)

Bluestribute, the code is the exact same for Macs as for Windows (that's part of the beauty of Squeak/Scratch). You should be able to open it by dragging the .image file on the Scratch.app file.


Jens Mönig

Offline

 

#28 2008-05-17 06:23:39

fabi85
Scratcher
Registered: 2008-05-13
Posts: 27

Re: Build a block (procedures)

personaly I agree with you (Cyclone103), that arrays are very usefull, but maybe that isn't the idea of Scratch to use such complex variables. But I'm looking forward to could use procedures. Without them it's hard to avoid a mess in the code.

Last edited by fabi85 (2008-05-17 06:25:13)

Offline

 

#29 2008-05-18 21:15:36

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: Build a block (procedures)

A block maker would be a good idea, but in a way it would have to be limited. There could be several types of build-a-block, but they should function as a sprite in a way. Basically, you would name and define your block (color, category, etc.) and set it a purpose (looks>scream>set text bubble to costume jagged>change sprite x by 10 wait.5 secs change sprite x by -10) and basically build like sprites, what each block can do.


All your base are belong to us

Offline

 

#30 2008-06-20 06:41:09

charles-stewart
Scratcher
Registered: 2008-06-20
Posts: 1

Re: Build a block (procedures)

It's been over a year since this request for comments was posted: are the Scratch team any closer to finalising some sort of procedural abstraction?  Is there a timeline for implementing it?

Offline

 

#31 2008-06-20 08:17:48

Cyclone103
Scratcher
Registered: 2008-03-20
Posts: 500+

Re: Build a block (procedures)

fabi85 wrote:

personaly I agree with you (Cyclone103), that arrays are very usefull, but maybe that isn't the idea of Scratch to use such complex variables. But I'm looking forward to could use procedures. Without them it's hard to avoid a mess in the code.

Maybe in that case the Scratch team could use the lists created by Jens, since we already know it can be done. They could be used to build an array, since the mod block could set the width and the height could be as large as you like.


All your base are belong to us

Offline

 

#32 2008-07-19 14:28:01

TOCM
Scratcher
Registered: 2008-07-18
Posts: 6

Re: Build a block (procedures)

I posted this elsewhere but I think this is the place to do it.
My idea is that you could make a function just like youd make a sprite like this below:

http://img143.imageshack.us/img143/119/functionspritexz2.jpg

A function wouldn't have a number of inputs (like variables) and one variable called output, that you have to set at the end of the script, functions would have no costumes or sounds just sripts like this one here that has just 1 input, this function is for squaring a number (ie a number times by itself)

http://img529.imageshack.us/img529/8338/squarezl4.jpg

When you make a Function you also get allong with it a new block in the http://scratch.mit.edu/forums/img/sbcats/numbers.png section like this:

http://img143.imageshack.us/img143/6901/squareblocket0.gif

and the block has the same nuber of inputs as the Function, from the code this is what would happen if you used the square block:

http://img143.imageshack.us/img143/370/squareblockexeh2.gif

And here's anothe possible one, this one has 2 inputs and works out the size of the difference between 2 numbers (ie there's no minuses involved):

http://img529.imageshack.us/img529/3364/absdiffho8.jpg

With this Function of course you also get this block:
http://img204.imageshack.us/img204/7409/absdiffblockqe8.gif

What you could also do is make a function that uses other functions that you've already made like this one for calculating pytagorases theorum for calculating the length hypotinuse of a right angled triangle from the length of the other 2 sides.

So the inputs here are the lengths of the two other sides of the triangle:

http://img529.imageshack.us/img529/9951/pythagorscodecs1.gif

and making this function creates this block:

http://img143.imageshack.us/img143/8139/pythagorasblockll3.gif


I have an example of how I currently attempt to tackle functions "my stuff"

Last edited by TOCM (2008-07-19 14:39:14)

Offline

 

#33 2008-08-20 08:24:45

matthewjose
Scratcher
Registered: 2008-07-16
Posts: 100+

Re: Build a block (procedures)

Mick wrote:

ye me too.

same here.


My chat room, and join a Critique Group for feedback on your projects.

Offline

 

#34 2008-08-20 15:36:19

likegames
Scratcher
Registered: 2008-03-24
Posts: 100+

Re: Build a block (procedures)

Cyclone103 wrote:

I think that the current block type needed most is an array. Arrays allow retention of more data than a variable. If that block were to be added, it would probably go under variables, and a good color would be yellow. If an array block was added, everyone could expand their work much easier, since only one "variable style block" would be used for storing massive amounts of data.

arrays are in scratch 1.3 i can secretly go in 1.3 candidate and there is a block maker type %a %b %c %d %e %f in a variable this breaks 1.2.1 until the variable is deleted

Last edited by likegames (2008-08-31 14:17:12)


There are 10 types of people in this world: Those who understand trinary, those who don't, and those who think this is the same old signature.
Three lines! (and base three!)

Offline

 

#35 2008-08-28 10:44:42

likegames
Scratcher
Registered: 2008-03-24
Posts: 100+

Re: Build a block (procedures)

Bluestribute wrote:

likegames wrote:

forget block maker, edit it with the source code!

I've tried, but can't get the code up and working. I download it and all, but where is it located for Mac's!!!???

http://scratch.mit.edu/pages/source drag it on scratch.app then click OK if a box comes up


There are 10 types of people in this world: Those who understand trinary, those who don't, and those who think this is the same old signature.
Three lines! (and base three!)

Offline

 

#36 2008-09-13 02:51:13

CPfan123
Scratcher
Registered: 2008-08-20
Posts: 90

Re: Build a block (procedures)

One block that I would like would be [blocks] <[  <=>  ]> [/blocks], that existed in NetScratch. Now, text input was discovered, and I would like to do passwords, like this:
[blocks] <if> <[ (Item (1) of List  <=> Password) ]>
<broadcast[ Correct Password
<end>
[/blocks]

Last edited by CPfan123 (2008-09-13 02:57:49)


Check out my Dice Spin game! http://scratch.mit.edu/projects/CPfan123/314874               Also see Paint Pro Flash! http://scratch.mit.edu/projects/CPfan123/289030
Scratch is good, but have you ever tried Game Maker? http://www.yoyogames.com

Offline

 

#37 2008-09-19 06:14:05

ekul
Scratcher
Registered: 2008-04-05
Posts: 2

Re: Build a block (procedures)

is a block a sub-routine (or sub)

Offline

 

#38 2008-09-27 16:32:01

OJY321
Scratcher
Registered: 2007-08-03
Posts: 68

Re: Build a block (procedures)

Hey, Jens posted a project about how to create custom blocks!

http://scratch.mit.edu/projects/Jens/75626

Offline

 

#39 2008-09-29 12:37:59

tcb
Scratcher
Registered: 2008-03-25
Posts: 100+

Re: Build a block (procedures)

i think there should be a block editor wich use scratch blocks to prggram it


http://goo.gl/eCQLihttp://goo.gl/sK54shttp://goo.gl/jC0dehttp://goo.gl/yhGLQhttp://goo.gl/wqvsQ

Offline

 

#40 2008-10-10 12:14:50

sonic2000
Scratcher
Registered: 2008-07-21
Posts: 26

Offline

 

#41 2008-10-10 13:53:41

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Offline

 

#42 2008-10-10 18:17:40

anim8rXtreme
Scratcher
Registered: 2007-10-24
Posts: 5

Re: Build a block (procedures)

I like the idea of having a feature in the right-click drop-down menu for a GROUP of blocks that says something like <convert...> and then you click on it, and you type in the wording for the block, so then all the blocks you selected are consolidated into one, and in THAT one's menu, it will have an option like <add...> where you could add a new block to the commands of that new block.  Then, all series of blocks identical to what was put into that block (in that project) would convert to that block.

Offline

 

#43 2008-10-27 18:31:20

jcubed
Scratcher
Registered: 2008-07-23
Posts: 65

Re: Build a block (procedures)

see: http://scratch.mit.edu/forums/viewtopic.php?pid=74488


Jcubed
Proud founder of Icdzat Productions.

Offline

 

#44 2008-10-29 16:14:53

thrash240
Scratcher
Registered: 2008-07-16
Posts: 20

Re: Build a block (procedures)

how about a extra category that is custom blocks and you can say create new block then drag a group of blocks into the new block then name it and it will work as a single block?

Offline

 

#45 2008-11-01 08:43:35

likegames
Scratcher
Registered: 2008-03-24
Posts: 100+

Re: Build a block (procedures)

Bluestribute wrote:

likegames wrote:

forget block maker, edit it with the source code!

I've tried, but can't get the code up and working. I download it and all, but where is it located for Mac's!!!???

on the mac, unzip it and DOUBLE-CLICK ON THE IMAGE FILE WITH A SQUEAKING MOUSE.


There are 10 types of people in this world: Those who understand trinary, those who don't, and those who think this is the same old signature.
Three lines! (and base three!)

Offline

 

#46 2008-11-03 23:54:13

moocow4
Scratcher
Registered: 2008-09-23
Posts: 29

Re: Build a block (procedures)

i think there should be an <if recieved(dropdown arrow)> block, that would be very useful for several of my current projects (sry if this is in rwrong forum, there were so many different sub forums)


http://scratch.mit.edu/projects/moocow4/327337 moo productions rules!

Offline

 

#47 2008-12-28 06:38:29

GoldenAxe
Scratcher
Registered: 2008-12-10
Posts: 48

Re: Build a block (procedures)

I appreciate CustomBlocks.

Offline

 

#48 2009-01-02 10:03:30

abeair
Scratcher
Registered: 2008-07-19
Posts: 100+

Re: Build a block (procedures)

Jens has made a block editor. Go to chirp.scratchr.org.


http://dragcave.net/image/NPtA.gif
http://www.danasoft.com/sig/ObamaLovesMacs.jpg

Offline

 

#49 2009-01-05 16:56:43

spatch
Scratcher
Registered: 2008-12-24
Posts: 1

Re: Build a block (procedures)

i disagree to you lot.

i think we should simply have smaller blocks, which can be inserted into each other.
this would be alot easier for the scratch team to engineer, because i think a make-your-own-block would just be too hard to make!

Offline

 

#50 2009-01-29 12:49:50

animalia
Scratcher
Registered: 2008-11-02
Posts: 70

Re: Build a block (procedures)

yes i think the yellow blocks shold be called: website
like making a way to make the sprite dragable on website at certain times

Offline

 

Board footer