Discuss Scratch

scratchmaster295
Scratcher
500+ posts

Is there a limit with how many clones you can have in a project

Hi! I did an experiment with clones, where the cat sprite would continuously clone. I kept the sprite at size 1. I found out that eventually, it stopped cloning.

That lead me asking, is there a limit for how many clones you can have?

Link to project I did the experiment on
ConfusedBiscuit
Scratcher
1000+ posts

Is there a limit with how many clones you can have in a project

The clone limit is 300.
Mr_Custom
Scratcher
100+ posts

Is there a limit with how many clones you can have in a project

In 2.0 it was 300 (Although you could get 301).

Link to source!
Skill_Games
Scratcher
100+ posts

Is there a limit with how many clones you can have in a project

The clone limit is 300. If you have more than that, cloning won't work properly.

You can use this block to reduce the number of clones you have:
deletethisclone

Last edited by Skill_Games (Nov. 1, 2019 20:49:45)

deck26
Scratcher
1000+ posts

Is there a limit with how many clones you can have in a project

Skill_Games wrote:

The clone limit is 300. If you have more than that, cloning won't work properly.

You can use this block to reduce the number of clones you have:
deletethisclone

Mr_Custom wrote:

In 2.0 it was 300 (Although you could get 301).

Link to source!
In Scratch 2 it was 301, not 300. It was changed to 300 when Scratch 3 came out.

All existing clones will still work if you hit the limit, you just can't create any more so always delete clones when they're no longer required.
Nambaseking01
Scratcher
1000+ posts

Is there a limit with how many clones you can have in a project

In Scratch 2.0 it was 301, but now it's 300 like @deck26 said.

If you need a lot of clones, you could do something like this

whenclickedsetCloneIdto0forevercreatecloneofmyselfwait1secswhenIstartasaclonechangeCloneIdby1ifCloneID=290thenrepeat90deletethisclone this will remove 90 clones and make the amount 200
Catalystix
Scratcher
100+ posts

Is there a limit with how many clones you can have in a project

300 is the allowed limit. but if you use list(s) and the pen extension, you can simulate more than 300 clones. you'll probably find out why there is a limit though. here is my demonstration of pen/list clones: https://scratch.mit.edu/projects/322273963/

SPACE to change the amount of pen/list clones

Last edited by Catalystix (Nov. 2, 2019 18:08:42)

deck26
Scratcher
1000+ posts

Is there a limit with how many clones you can have in a project

Nambaseking01 wrote:

In Scratch 2.0 it was 301, but now it's 300 like @deck26 said.

If you need a lot of clones, you could do something like this

whenclickedsetCloneIdto0forevercreatecloneofmyselfwait1secswhenIstartasaclonechangeCloneIdby1ifCloneID=290thenrepeat90deletethisclone this will remove 90 clones and make the amount 200
Each clone can only delete itself and is no longer running a script when it does so so the repeat(90) is doing nothing.

Since you don't change CloneID when you delete the clone all you're doing is deleting one clone as soon as you create it but the next one will set CloneID to 291 and it and subsequent clones will be created normally so all you've achieved is a slight hiccup on the way to the 300 limit.

Last edited by deck26 (Nov. 3, 2019 10:19:03)

Nambaseking01
Scratcher
1000+ posts

Is there a limit with how many clones you can have in a project

deck26 wrote:

-snip-
Each clone can only delete itself and is no longer running a script when it does so so the repeat(90) is doing nothing.

Since you don't change CloneID when you delete the clone all you're doing is deleting one clone as soon as you create it but the next one will set CloneID to 291 and it and subsequent clones will be created normally so all you've achieved is a slight hiccup on the way to the 300 limit.

Oh, I see - thanks for the heads up!

Powered by DjangoBB