Discuss Scratch

Lord_Vader123456789
Scratcher
14 posts

Delete all clones

This is stupid why we don't have it already. In fact, its so stupid that I originally thought it existed! Now I have to do crazy workarounds to get each clone to individually self-delete. Basically it is a block like this

delete all clones of [ v]

The inputs would be all clones and clones of this sprite.
PsychicAura
Scratcher
100+ posts

Delete all clones

when I receive [delete all clones v]
delete this clone

now just put a broadcast whenever you need to clear all clones. what's so crazy about the workaround? It literally only uses 2 more blocks.

Last edited by PsychicAura (Nov. 25, 2022 21:59:12)

Lord_Vader123456789
Scratcher
14 posts

Delete all clones

It needs to be attached to a specific clone, right?
selfexplanatory
Scratcher
100+ posts

Delete all clones

when I receive [delete clones in all sprites v]
delete this clone //put this broadcast in every sprite, with this same code
when I receive [delete only this sprite v]
delete this clone //only put it in the sprite
k0d3rrr
Scratcher
1000+ posts

Delete all clones

You can do this with already existing blocks, and also, this has been suggested before: https://scratch.mit.edu/discuss/topic/72480/
AbrahamAgana8
Scratcher
2 posts

Delete all clones

hi i used this one for deleting all clones of one sprite with heavy inspo from selfexplanatory
when this sprite clicked
broadcast [delete all clones ] and wait
when I receive [delete all clones]
if <(costume [number]) = 2> then
delete this clone
end
AbrahamAgana8
Scratcher
2 posts

Delete all clones

AbrahamAgana8 wrote:

hi i used this one for deleting all clones of one sprite with heavy inspo from selfexplanatory
when this sprite clicked
broadcast [delete all clones ] and wait
when I receive [delete all clones]
if <(costume [number]) = (2)> then
delete this clone
end
by the way you will need to do this for every sprite

Last edited by AbrahamAgana8 (March 4, 2025 05:25:55)

scratchnikcool
Scratcher
8 posts

Delete all clones

Lord_Vader123456789 wrote:

It needs to be attached to a specific clone, right?
Yes, it does. Here's a workaround that needs to be attached to the clone code
if <(deleteallclones?) = [1]> then
delete this clone
end

Last edited by scratchnikcool (April 29, 2025 17:42:19)

NegativeFourteen
Scratcher
2 posts

Delete all clones

scratchnikcool wrote:

Lord_Vader123456789 wrote:

It needs to be attached to a specific clone, right?
Yes, it does. Here's a workaround that needs to be attached to the clone code
if <(deleteallclones?) = [1]> then
delete this clone
end

thank you so much
karate3434
Scratcher
5 posts

Delete all clones

What if there are more than 1 clones and you want to delete them at the same time?
when green flag clicked
say [how, how, how, how, HOOOWWWW??!!]

Last edited by karate3434 (Oct. 12, 2025 00:04:22)

medians
Scratcher
1000+ posts

Delete all clones

karate3434 wrote:

What if there are more than 1 clones and you want to delete them at the same time?
when green flag clicked
say [how, how, how, how, HOOOWWWW??!!]
The broadcast does that if you're referring to the workaround. It doesn't delete only one clone, as clones receive broadcasts
ThatOneNewCoder
Scratcher
1 post

Delete all clones

Hi

Last edited by ThatOneNewCoder (Today 09:49:00)

Powered by DjangoBB