Discuss Scratch

TMOTW6697_
New Scratcher
2 posts

How do I delete (and/or hide!!!) a clone sprite?

I'm trying to make a ripoff snake game just for fun, see if I can, and I know for the actual gameplay itself I'd like to use clones (because no way am I using a bunch of animation frames and sprites for this…) so I'm just testing around with a thing on the title page !

Basically, to test it out, I'm working on a little Easter Egg where if you tap the (original version of the clone) sprite the clone disappears and a little animation of a snake biting you plays… But I can't get the clone to delete ? I have a “forever” tag on the clone, but even when I take it off it won't delete !

I'm using “When this Sprite clicked” > Wait 0.5 seconds > Delete this Clone“ and it only ”works" (aka lights up- clone still won't actually delete) when I tap the code thread itself, and doesn't work when I actually tap the sprite– Is there a chance I need to tap the clone and not the original sprite? That'd still work I suppose but either way I'd like to avoid this in the future.
Also, I only have one thread of code that says “Create clone of myself” and even pressing the “stop” before I press the flag again, the clone seems to duplicate itself !

Basically:
Can't get my “when this sprite clicked” box to work, therefore a clone won't delete and/or hide.
…Can't get my clone to delete and/or hide.
Clone may be duplicating itself?
(Honestly if you have any other clone-related advice at all, lmk cause I'm new to clone sprites…)
FroYo666
Scratcher
30 posts

How do I delete (and/or hide!!!) a clone sprite?

delete this clone

Put this block at the end of your clones script to delete it. It is found at the bottom of the “control” block section.
Clones also respond to normal code in the sprite. so if you need the clone to react to a click, use this code, if the clone is clicked, it will get bigger, when the sprite is clicked it will get bigger. replace the getting bigger with your code. Delete this clone can be hide as well.

when green flag clicked
create clone of [Myself v]
go to x: (100) y: (0)
when I start as a clone
go to x: (0) y: (0)
when this sprite clicked
change size by (10)
wait (1) secs
delete this clone

Last edited by FroYo666 (May 22, 2024 23:11:23)

27xz
Scratcher
65 posts

How do I delete (and/or hide!!!) a clone sprite?

If you want the original sprite to cause clones to be deleted, then I would recommend using a broadcast instead.

when this sprite clicked
broadcast [delete v]

when I receive [delete v]
delete this clone
TMOTW6697_
New Scratcher
2 posts

How do I delete (and/or hide!!!) a clone sprite?

Ah I'll try those ! I am using the “Delete this clone” block already which is why I was sorta concerned, but the broadcast may work better than what I was doing lol- Thank you, if this works you'll save me from youtube and google searching lol (I'm bad at searching specific things on google like this)
TMOTW6697_
New Scratcher
2 posts

How do I delete (and/or hide!!!) a clone sprite?

RAHH 27xz, it worked, thank you !! That is.. so much simpler than what I was tryna' do.. lol
BennyBoy2025603
Scratcher
3 posts

How do I delete (and/or hide!!!) a clone sprite?

when green flag clicked
broadcast [PANIC v]

when i delete a sprite it has an arrow pointing to the sprite and i cant delete it!


when I receive [PANIC v]
ask [HELP ME!!!!!!!!!!!] and wait

Last edited by BennyBoy2025603 (April 23, 2026 08:15:47)

Powered by DjangoBB