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

#1 2012-11-18 20:37:09

gkd720
New Scratcher
Registered: 2012-11-18
Posts: 1

How to duplicate a sprite?

I'd like to make multiple copies of a particular sprite, and modify their locations. I searched the forums but there seem to be many references to duplication and cloning, but it still seems like those examples are referencing sprites with straight line code. I'd like to be able make multiple copies of a particular sprite as a new named sprite (with a code generated name) and modify its location. Something like "set spritenum=1", "copy sprite as sprite<spritenum>", "set x1 to 5", "set y1 to 9", "move sprite1 to x1,y1", "increment spritenum", (make and move sprite2, sprite3, etc.). Is there a basic way to do this? It seems rather low-tech to make up 10 sprites manually beforehand, and then reference them in a program. I would appreciate some recommended terms/topics to further search for, although some actual code wouldn't hurt. Thanks for any guidance.

Offline

 

#2 2012-11-18 20:51:07

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How to duplicate a sprite?

Currently, cloning isn't supported in Scratch, so you will have to make 10 sprites beforehand, though in Scratch 2.0, cloning is going to be added. If you would like to read more about this, I would recommend this article.

Anyway, I hope that this helps!

Last edited by ErnieParke (2012-11-18 20:52:33)


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer