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

#1 2012-03-18 18:23:35

art-on-black
Scratcher
Registered: 2011-08-15
Posts: 20

Methods

One of the most limiting things about scratch is the fact that you have to copy the same script everywhere if you have, say, 10 bad guys that do exactly the same thing. If there was some way to define a method, like in Java, you could have more efficient OO-style programs. This would keep a complicated program from taking up too much memory.

Offline

 

#2 2012-03-18 18:28:05

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Methods

A method?
What do you mean?


6418,

Offline

 

#3 2012-03-18 19:54:59

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Methods

I don't quite get what ou mean, but if you right-click on a script or sprite you can duplicate it.

Offline

 

#4 2012-03-18 20:22:27

Luke121
Scratcher
Registered: 2008-07-14
Posts: 1000+

Re: Methods

art-on-black wrote:

One of the most limiting things about scratch is the fact that you have to copy the same script everywhere if you have, say, 10 bad guys that do exactly the same thing. If there was some way to define a method, like in Java, you could have more efficient OO-style programs. This would keep a complicated program from taking up too much memory.

It's already being implemented in Scratch 2.0.

All you have to do is construct a script the way you normally would, and you can tweak it to be set as it's own sequence. This way, all you need is one block each time you want to copy a script.


http://bit.ly/IlVuB5
Sorry PF, too lazy to make my own!  tongue

Offline

 

#5 2012-03-19 01:23:14

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Methods

This sounds like the clone block suggestion.


http://trinary.tk/images/signature_.php

Offline

 

#6 2012-03-19 08:03:07

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

Re: Methods

Methods, procedures, functions, whatever you want to call them are coming in Scratch 2.0!

Offline

 

#7 2012-03-19 08:07:15

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Methods

trinary wrote:

This sounds like the clone block suggestion.

Methods are basically making your own blocks out of other blocks. (in scratch) It is already in Scratch 2.0.

Offline

 

Board footer