Discuss Scratch

davidvaz1
Scratcher
100+ posts

How to know the number of clones in a project?

Hey Scratchers. This is @davidvaz1 here. I want to know the number of clones in a project of a sprite, so that I can limit the number of clones to the number x. (This number x is an example number.)
How do you do it?

Thank and regards,
@davidvaz1
MasterofTheBrick
Scratcher
1000+ posts

How to know the number of clones in a project?

Just keep track of whatever clones you create and increase a counter by 1 everytime one is spawned. Shouldn't be too difficult.
davidvaz1
Scratcher
100+ posts

How to know the number of clones in a project?

MasterofTheBrick wrote:

Just keep track of whatever clones you create and increase a counter by 1 everytime one is spawned. Shouldn't be too difficult.

You mean in a list? Even I thought of that.
deck26
Scratcher
1000+ posts

How to know the number of clones in a project?

No need for a list, just a global variable.
spiderman562456
Scratcher
4 posts

How to know the number of clones in a project?

you can make it so when ever a clone is created it adds one to a variable?

Powered by DjangoBB