How to delete all clones at once

I can't seem to figure out how to delete all clones at once. Can someone tell me? Is there a block for it? Thanks. :slight_smile:

Edit: Apparently that throws an error, nvm

oh... any other ways?

append input list is just regular append, drag a block onto the arrows and a red halo should appear and it will say input list

also not any other ways that I know of, sorry

oh, that's ok. thanks, anyway.

here's how I figured it out

apparently the my other sprites includes clones too (which I'm pretty sure didn't happen before)

the (my [self v]) is there because this block can run in a clone, so it'll have to also delete itself (actually, now that I think about it, move the (list (my [self v] ) to the end of the list)

edit: here's a much simpler way

this works because you can't actually delete a sprite using the delete this clone block.

this worked! thanks! if there will be any problem with this i'll let you know and we can sort it out together. :slight_smile: :slight_smile: :slight_smile:

the problem with that is it doesn't work in the stage.

well, ok. This will work

you have to do

to work on permanent clones.

um, yeah. but that'll actually delete all the sprites. We don't want that.

no it won't. a sprite needs to have a parent for the set temporary to true block to work.

you're right. Also, I didn't think about asking the stage for my other sprites, that's better than mine.

you need to substitute the string Stage for (image), so it'll work regardless of what the stage is named

ohhh right. better version:

(the keep block isn't necessary, it just reduces some time.)

alternative solution: you can have
when I receive [delete clones v] :: control
delete this clone

in every sprite. then obviously to delete each clone you say

broadcast [delete clones v] :: control

yeah, just it can't be in a custom block.

this is how I always do it!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.