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

#1 2011-05-30 13:31:11

diegobarle
Scratcher
Registered: 2011-04-26
Posts: 17

objects

Does scratch has the option to generate (duplicate) objects while you are executing a scratch program?
Like for example if you have an object created, you press the green flag to start the program, and you press for example the space bar, that object will duplicate and will appear in an other part of the screen.

Im asking this because if i can do that, it will reduce a lot the cuantity of objects that i have to do in the program.

Thanks  smile

Offline

 

#2 2011-05-30 13:33:59

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

Re: objects

No, there is no cloning in Scratch 1.4.  sad  There will be in 2.0!  smile

Offline

 

#3 2011-05-30 13:48:46

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: objects

You can do this with stamping. Just move your object to the desired position and stamp it.

The problem is that these objects are just images and won't interact.


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#4 2011-05-30 13:50:13

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: objects

scimonster wrote:

No, there is no cloning in Scratch 1.4.  sad  There will be in 2.0!  smile

They're considering it. It' not set in stone just yet.

johnm wrote:

We're considering this feature. We had a clone feature in earlier version of Scratch, so we know that a limit is needed or the system can quickly become so overloaded by out-of-control cloning that it doesn't even respond to the stop button. One thing we didn't have in that version was a "when sprite cloned" hat -- and I think that's a key innovation that could make this feature really usable.

Personally, I think it's a good idea if all clones disappear when you stop the project. If you want the effect of "persistent" clones you can write a setup script that makes as many copies as you need. For example, you might use that technique to create a bunch of bricks for a "breakout" game.

One final problem with clones is how to make them go away when they are no longer needed. You might have a "destroy this clone" block, of course. But another way to would be to have the clone automatically delete itself when it no longer has any running scripts. So, for example, a brick in a breakout game might have a script that waits until the ball sprite touches it, then adds one the score and stops. That would cause the the brick to automatically disappear when the ball touched it.

(Source)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2011-05-30 16:21:20

diegobarle
Scratcher
Registered: 2011-04-26
Posts: 17

Re: objects

OK thanxs  big_smile   I´ll be waiting the new version with enthusiasm  tongue
And this new scratch version, if i want to add the project that im making in this version to the new version, is going to take it? Or i have to do everything again in the new version  :S  Cause i have made maaany scripts to the game im performing, so it would be killing to start all over again XD

Offline

 

#6 2011-05-31 06:45:26

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

Re: objects

diegobarle wrote:

OK thanxs  big_smile   I´ll be waiting the new version with enthusiasm  tongue
And this new scratch version, if i want to add the project that im making in this version to the new version, is going to take it? Or i have to do everything again in the new version  :S  Cause i have made maaany scripts to the game im performing, so it would be killing to start all over again XD

Yeah, 2.0 will support anything made in 1.4.  smile  I hope.

Offline

 

Board footer