Discuss Scratch

Orume0
Scratcher
82 posts

clone switching costumes

Hello, i was making a project and wanted to when a variable becomes certain thing it will erase all the clones of that sprite and create new ones with new costumes (note that the old costumes and the new costumes will be sorted so there are 7 types of old costumes and 7 types of new costumes)
Haycat2009
Scratcher
500+ posts

clone switching costumes

Orume0 wrote:

Hello, i was making a project and wanted to when a variable becomes certain thing it will erase all the clones of that sprite and create new ones with new costumes (note that the old costumes and the new costumes will be sorted so there are 7 types of old costumes and 7 types of new costumes)
You will need a Clone ID and hierarchy system using a “For this sprite only” local varible.
when green flag clicked
set [hierarchy v] to [0]
set [Clone ID v] to [1]
repeat (7)
create clone of [Myself v]
change [Clone ID v] by (1)
end
when I start as a clone
switch costume to ((Clone ID) + ((hierarchy) * (7)))
Your code here
set [hierarchy v] to [1]
create clone of [Myself v]
delete this clone
Orume0
Scratcher
82 posts

clone switching costumes

u trying to troll me, at least i did a backup from my project bc ur code has a

when I start as a clone
da awsome code ::custom //note that i didnt use a custom block :D
create clone of ( myself v)
delete this clone

but maybe i just made teh code wrong…

Last edited by Orume0 (Aug. 16, 2026 13:43:56)

10goto10
Scratcher
1000+ posts

clone switching costumes

I wrote a small study that does what you are asking for. https://scratch.mit.edu/projects/1369423963/

It does not place the new clones where the old ones had been, which I think was the point of the code that Haycat2009 gave you. Mine just makes 7 new clones using the next set of 7 costumes at 7 random locations.

Powered by DjangoBB