Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how do I make tag in scratch with clones?
- SussyCowHead
-
17 posts
how do I make tag in scratch with clones?
I'm trying to create something based on Squid Games, it's called Scratch Games. The first game will be tag, the clone whom is it should point at the nearest clone/sprite. I need help 



































Last edited by SussyCowHead (March 11, 2025 17:13:31)
- EpicGhoul993
-
1000+ posts
how do I make tag in scratch with clones?
Store all the clone positions in a list, and make another list for distance towards each clone. (If you need to do this for every clone, this distance list needs to be set to “for this sprite only”.)
You will need to assign each clone its ID, and basically loop through every ID (skip the calculating clone's own ID of course) to find which one to point to.
The formula of distance between two positions is as follows:
You will need to assign each clone its ID, and basically loop through every ID (skip the calculating clone's own ID of course) to find which one to point to.
The formula of distance between two positions is as follows:
You will also need this block to point towards the nearest calculated position, you can find it at the end of this wiki page:
- deck26
-
1000+ posts
how do I make tag in scratch with clones?
If you search for ‘nearest clone’ you'll find various solutions to this.
- SussyCowHead
-
17 posts
how do I make tag in scratch with clones?
uhh, can't use “point towards” block, im using clones, it will point towards the original sprite.
- scratcherman203040
-
7 posts
how do I make tag in scratch with clones?
I´ll keep you updated if i find away!!
- scratcherman203040
-
7 posts
how do I make tag in scratch with clones?
I found away to do it in a test way so do it in a different project first but the first two times it works its still progress and make a variable called clonedir fot this sprite only dont forget that so the code is below!
- scratcherman203040
-
7 posts
how do I make tag in scratch with clones?
Actually this just mimics the turning thing sorry!



- Penthusiast
-
28 posts
how do I make tag in scratch with clones?
I'm trying to create something based on Squid Games, it's called Scratch Games. The first game will be tag, the clone whom is it should point at the nearest clone/sprite. I need help
Check the distance from each clone to the point with the distance formula. Given the distance between two points is equal to the square root of x2 - x1 squared, plus y2-y1 squared (Basically constructing a triangle and finding the hypotenuse using the Pythagorean theorem), it would look something like this in scratch code.
Then just check the distance

This is what the distance block in scratch does - just that block only works to other sprites. This works for any two positions.
- Discussion Forums
- » Help with Scripts
-
» how do I make tag in scratch with clones?