Discuss Scratch

cavemanster
Scratcher
100+ posts

Automatic Clone ID assigning.

For almost every project I create, I have to use local variables to assign id's to each individual clone and then use that to code clones specifically. I then have to use trigonometry and pythagorus theorem in order to make them calculate distances and point at other clones or sprites. I also often have to track their X positions and Y positions on lists and use that.
My suggestion is that each clone is immediately assigned an id when created. The first clone created is assigned the id: 1, the second clone: 2 etc. Now, every block that refers to a sprite can also have an option for "sprite clone " and the id can be inserted in the blank. This just makes basically every complex clone project much simpler and more convenient
lHatr
Scratcher
57 posts

Automatic Clone ID assigning.

CST1229
Scratcher
1000+ posts

Automatic Clone ID assigning.

My idea is that clones can be referred to by just using the sprite name plus " :: [clone id]".
Additionally, there would be a
newcloneofmyselfoptions: new, nearest, newest, oldest, random, any
block that can make a new clone alongside reporting a clone id.
So this:
touchingjoinCat-a :: 1
would check if the sprite is touching the first clone of Cat-a.
Additionally, there would be an “:: any” clone id which checks for every clone id, which the any option of the clone of block reports..
cavemanster
Scratcher
100+ posts

Automatic Clone ID assigning.

CST1229 wrote:

My idea is that clones can be referred to by just using the sprite name plus " :: [clone id]".
Additionally, there would be a
newcloneofmyselfoptions: new, nearest, newest, oldest, random, any
block that can make a new clone alongside reporting a clone id.
So this:
touchingjoinCat-a :: 1
would check if the sprite is touching the first clone of Cat-a.
Additionally, there would be an “:: any” clone id which checks for every clone id, which the any option of the clone of block reports..
Hi, turns out this post I made is a duplicate! Maybe comment this in the original thread.

Powered by DjangoBB