A generate _ block would work much like a broadcast. You would name it, and a dialog box would come up (similar to building a block in BYOB) where you would build a script. Then you could draw a costume. Once you were done, your work would not show in the program until the generate block was activated. The costume would appear, preform the scripts placed in the box before hand, and then be removed from the program. It would allow sprites to be created on the fly.
So you say, "why not just hide the sprite and show it when necessary?" Without a generation system, you can only show/hide sprites that exist. Each sprite that exists makes the file size larger. A generation system would do wonders for space-shooter games where only so many projectiles can be on-screen at once. It would be similar to the pen tool, except you could have all the control you have of a sprite. Scratch is one of the few programming languages that doesn't have a generation function. This should definitely be a priority when making the next version of Scratch.
Anyone have anything to say about this idea?
Offline
There's already a similar feature which is likely to be in Scratch 2.0.
http://suggest.scratch.mit.edu/forums/6 … ?ref=title
Offline
Would the generate block work like
var mySprite = new mySprite;
used in JavaScript/Actionscript, Ruby, C++,
and other object-oriented languages?
Offline