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

#1 2008-09-27 14:37:19

javey_h
Scratcher
Registered: 2008-09-27
Posts: 2

Can I define and reference a block?

Hi, I'm wondering if there is a way to define a block of script, and then reference it in another script.  I'm thinking of something along the lines of naming a procedure and then simply using the name of the procedure to run all the scripts in it.  Does Scratch have this functionality?

Offline

 

#2 2008-09-27 16:04:15

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Can I define and reference a block?

The closest thing Scratch has to procedures is Broadcast Messages.  However, Broadcast Messages do not accept parameters so you end up using global variables.  Not ideal...but you can do a lot with them.

There has been talk about adding procedures to Scratch and I believe it is actively under development.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-09-27 20:06:05

erind616
Scratcher
Registered: 2007-10-19
Posts: 51

Re: Can I define and reference a block?

That would be cool.  big_smile


What you lookin' at??? I thought so!!!

Offline

 

Board footer