How do I check if im clicking a clone and which clone im clicking?

I’m working on a project, and I want to check which clone I’m pressing. I was thinking i just check if im clicking in a certain area but surely theres a better way?

Welcome to Snap!

Fun thing about Snap! - Sprites (and the stage) are first-class! First-class meaning you can store it in variables or lists (bh could probably explain this better.) So, you may do something like this:

(note: you can generate a script pic like that by right-clicking on the scripting area and pressing scripts pic.... You can also do this per script by using script pic.... Using these will help people help you and allow you to help other people! its great.)

Now to help more, would you be able to share the project or atleast what you need to do? Oh, also, you might want to check the Snap! Manual. Snap! has a lot of other features that differ from Scratch, what I’m assuming you came from. Of course, again bh (one of the main developers of Snap!) would be able to help you much more, but I’m doing the best at the moment.

And again, welcome to Snap! (atleast the Snap! forum.)


another example, with LAUNCH

Do you mean Scratch?

Of course, that would work but properly a bit complicated for any new person. Just saying! Of course its nice to use something like that (I should make a custom block for a good click detection without hats.. in fact, I’m going to do that as that might actually be more useful

Edit: I did!
untitled script pic(41)
This should work fine at the end of a when I start as a clone block. Perhaps this is more what you were looking for @mohammad ?

Yeah, sorry :~)

Yes! Thank you very much :>

You’re welcome! Note, I’m pretty sure you’re able to mark my post as a solution for anyone else coming across this :~)

again bh (one of the main developers of Snap!) would be able to help you much more

Nah, you did fine.

But I don’t understand why the OP can’t just use


so that the clone itself can be in charge of responding to the click, rather than having some other script keep testing for a click.

Well, they can, that’s what I was getting through in the first post, however if that sensing block works it works. Even though it is technically" slower as when sprite clicked doesn’t check mouse down and such every frame

It’s not just a matter of speed. One of the technical decisions Scratch got spectacularly right was to make multithreading and event-driven code central to its programming model, something that isn’t nearly as natural in the grownup languages. I’m guessing that the OP’s project would be cleaner and more readable with a WHEN I AM CLICKED script, and so that’s what we should encourage. :~)