The Ultimate Guide To Clones

Clone Index can also prevent accidental clones

If you, for example, had a project that clones and object with the tap of a button. It will not only clone the original object, but it will also clone its cloned object as well. This would lead to 3 clones instead of 2, then it would lead to 7 clones, 15 clones, etc. If you simply place a check once if (self(clone index))=(1), it will only clone the original object. There is a project that explains it very well, though I cannot find it. I also used clone index to alter certain objects in an old project I made, but I stopped working on it. I’m still making projects, though.

5 Likes

Thanks, I’ll see if I can make a project of my own

3 Likes

Clone Index is probably what I have found most helpful in HS through all my years, literally the best function, and this tutorial just makes even more people know about this. Simply Amazing!

3 Likes

Know i can make a one object game xd
(Buuuuuump)

3 Likes

Already done that in Flower Tapper. The project is also rising right now.

4 Likes

Im going to make a jump jump game

2 Likes

Wow this was one month ago?

Huh, time goes fast lol

1 Like

I was poked :face_with_monocle:

1 Like

https://forum.gethopscotch.com/t/you-can-talk-about-your-hopscotch-coding-here-20-official/58028/7642?u=nobody

Here is another method too — method 4 with recursion from ThinBuffalo, but with a slight change to make it faster. It puts the recursive ability inside the Else part of Check if else (technique thanks to Petrichor.)

3 Likes