Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Sprite duplicates itself while cloning
- AntonL1kesPotato
- Scratcher
1000+ posts
Sprite duplicates itself while cloning
I was working on a sprite that acts something like a spike. It's supposed to create clones of himself in order to have multiple of them at once, of course. However, even after putting a filter for clones to prevent them to make clones of themselves, it ends up having 300 clones at once. I probably made a typo somewhere but i cannot find the reason. Link to the project: turbowarp.org/530555184 the cloning happens at “when i receive game begin” hat block, and the clones deletes themselves at the spike custom block.
Any help would be appreciated!
Any help would be appreciated!
- deck26
- Scratcher
1000+ posts
Sprite duplicates itself while cloning
Please explain what is supposed to stop spike clones creating more clones. If it's the variable spk.% that's a global variable and it needs to be local to the sprite.
- AntonL1kesPotato
- Scratcher
1000+ posts
Sprite duplicates itself while cloning
The spk.% is supposed to say if the spike generation is randomly generated using pick random blocks or structured using lists. İt's the variable who is supposed to stop the sprite duplicating itself. Please explain what is supposed to stop spike clones creating more clones. If it's the variable spk.% that's a global variable and it needs to be local to the sprite.
- deck26
- Scratcher
1000+ posts
Sprite duplicates itself while cloning
How? Describe the method please.The spk.% is supposed to say if the spike generation is randomly generated using pick random blocks or structured using lists. İt's the variable who is supposed to stop the sprite duplicating itself. Please explain what is supposed to stop spike clones creating more clones. If it's the variable spk.% that's a global variable and it needs to be local to the sprite.
- Discussion Forums
- » Help with Scripts
- » Sprite duplicates itself while cloning