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.
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.
the problem with that is it doesn't work in the stage.
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 (), so it'll work regardless of what the stage is named
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.