Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » clones of the same sprite being able to check if they are touching a specific costume
- hotcole2021
-
Scratcher
6 posts
clones of the same sprite being able to check if they are touching a specific costume
I am making a game where this is a vital line of code I need and can't figure out how to make it work. I know how make clones check if they are touching each other but I need them to know if that clone has a specific costume on.
- colinmacc
-
Scratcher
1000+ posts
clones of the same sprite being able to check if they are touching a specific costume
You should ask in the Help With Scripts forum.
One way to do it is temporarily hide all the clones except for the ones with that costume, then do the touching sprite check, and then show all the other clones again.
One way to do it is temporarily hide all the clones except for the ones with that costume, then do the touching sprite check, and then show all the other clones again.
broadcast [Hide Other Clones v]
broadcast [Check touching v]
broadcast [Show All Clones Again v]
- 10goto10
-
Scratcher
1000+ posts
clones of the same sprite being able to check if they are touching a specific costume
It’s probably best if you’ll share your project and post a link.
What’s been suggested won’t work if everything is a clone of one sprite because a hidden clone can’t detect touching another clone even if it is shown. So, seeing what your project needs to do would help us make sure that what we suggest will work in your case.
Usually what I see is people doing is some type of color test but again, seeing your project is best.
What’s been suggested won’t work if everything is a clone of one sprite because a hidden clone can’t detect touching another clone even if it is shown. So, seeing what your project needs to do would help us make sure that what we suggest will work in your case.
Usually what I see is people doing is some type of color test but again, seeing your project is best.
- hotcole2021
-
Scratcher
6 posts
clones of the same sprite being able to check if they are touching a specific costume
https://scratch.mit.edu/projects/1231281774/
the problem is in sprite one and it is the blob of code with blocks and two comments by it.
I need it lag friendly because there are +100 clones at a time.
the problem is in sprite one and it is the blob of code with blocks and two comments by it.
I need it lag friendly because there are +100 clones at a time.
Last edited by hotcole2021 (Nov. 11, 2025 16:16:12)
- 10goto10
-
Scratcher
1000+ posts
clones of the same sprite being able to check if they are touching a specific costume
I remixed your project using the “replace the BH costumed clone with a replacement clone of a different sprite” technique. The coins sprites now have an easy time of seeing when they are touching a BH coin.
https://scratch.mit.edu/projects/1241647669/
I changed some small other things just to help me make this but those can be ignored.
The suggestion to test color might not have worked because of speed and because the BH costume is not just one color. (but you could still try it).
https://scratch.mit.edu/projects/1241647669/
I changed some small other things just to help me make this but those can be ignored.
The suggestion to test color might not have worked because of speed and because the BH costume is not just one color. (but you could still try it).
- hotcole2021
-
Scratcher
6 posts
clones of the same sprite being able to check if they are touching a specific costume
thanks I really apricate the help!
- Discussion Forums
- » Help with Scripts
-
» clones of the same sprite being able to check if they are touching a specific costume