Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Clone Identfication
- UnscrambledEgg
-
Scratcher
100+ posts
Clone Identfication
How can I identify certain clones in order of when they were made?
- medians
-
Scratcher
1000+ posts
Clone Identfication
You can use clone id for that.
https://scratch.mit.edu/projects/804792818/
READ THE NOTES AND CREDITS.
https://scratch.mit.edu/projects/804792818/
READ THE NOTES AND CREDITS.
- DaFrog50
-
Scratcher
38 posts
Clone Identfication
How can I identify certain clones in order of when they were made?
when green flag clickedThen just add a when I start as clone block to the script, and then that clone ID variable is stored in the clone, so hope that clarified some stuff.
set [cloneID v] to [1]
repeat (4)
create clone of [myself v]
change [cloneID v] by (1)
end
If you need further help, just ask me and Ill try to come up with a solution!
- UnscrambledEgg
-
Scratcher
100+ posts
Clone Identfication
Cool! Thank youHow can I identify certain clones in order of when they were made?when green flag clickedThen just add a when I start as clone block to the script, and then that clone ID variable is stored in the clone, so hope that clarified some stuff.
set [cloneID v] to [1]
repeat (4)
create clone of [myself v]
change [cloneID v] by (1)
end
If you need further help, just ask me and Ill try to come up with a solution!

- UnscrambledEgg
-
Scratcher
100+ posts
Clone Identfication
Wait- but the Clone ID will be the same for each clone, no?Cool! Thank youHow can I identify certain clones in order of when they were made?when green flag clickedThen just add a when I start as clone block to the script, and then that clone ID variable is stored in the clone, so hope that clarified some stuff.
set [cloneID v] to [1]
repeat (4)
create clone of [myself v]
change [cloneID v] by (1)
end
If you need further help, just ask me and Ill try to come up with a solution!
- costlycoyote
-
Scratcher
45 posts
Clone Identfication
that above code will work perfectly. However, unless you check the “for this sprite only” box, (if you already clarified, forgive my explanation), it will not work. This is because if the variable is available to all sprites, then when that script changes cloneID by 1, then each clone will not have Its own cloneID value, because it is changing the value for every sprite and clone, and all clones calling on that variable will read the exact same value for cloneID, therefore defeating the purpose of the cloneID variable.
- DaFrog50
-
Scratcher
38 posts
Clone Identfication
Oh, I forgot! You just have to tick the ‘only for this sprite’ box, then it just keeps the same value in the clones, even if it has updated on the original sprite.Wait- but the Clone ID will be the same for each clone, no?Cool! Thank youHow can I identify certain clones in order of when they were made?when green flag clickedThen just add a when I start as clone block to the script, and then that clone ID variable is stored in the clone, so hope that clarified some stuff.
set [cloneID v] to [1]
repeat (4)
create clone of [myself v]
change [cloneID v] by (1)
end
If you need further help, just ask me and Ill try to come up with a solution!
that above code will work perfectly. However, unless you check the “for this sprite only” box, (if you already clarified, forgive my explanation), it will not work. This is because if the variable is available to all sprites, then when that script changes cloneID by 1, then each clone will not have Its own cloneID value, because it is changing the value for every sprite and clone, and all clones calling on that variable will read the exact same value for cloneID, therefore defeating the purpose of the cloneID variable.Oh, looks like someone already answered it.
- Discussion Forums
- » Help with Scripts
-
» Clone Identfication