Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Clones aren't being created
- StewBro1
-
11 posts
Clones aren't being created
I am creating a flappy bird game, and I need to create clones to make the score, pipes, and background. While I was test running, I tried dying a few times. After once or twice, the clones stopped cloning. There is a retry button, so you don't need to press the green flag and restart the whole code. Does anybody know how to fix this?
- firedestroyer1
-
72 posts
Clones aren't being created
Are you deleting the clones after they're used? Scratch has a 300 clone limit, so if you don't delete the old ones, eventually you'll hit that limit and it wont make any more. Especially if the retry button doesn't delete the clones after use.
- FlamerBoy12
-
33 posts
Clones aren't being created
Scratch has a 300 clone limit and check if you are deleting them. For more help or that doesn't help then I recommend Questions about Scratch or Bugs and Glitches.
- cIoudyness
-
500+ posts
Clones aren't being created
perhaps the retry should cast a broadcast that makes all clones delete themselves. then you can just run your game start code again and only clone the necessary stuff. also important in a flappy bird game is to delete the pipes that have already past, maybe if x position < -220 then delete clone
- ConnaLulu
-
40 posts
Clones aren't being created
Are you using a broadcast or variable? (a variable sounds odd but it works) Like, you could try this.
Like other commenters are saying, it may because you may using too many clones, as Scratch has a 300 clone limit. Remember that clones and the original sprite both share broadcasts (and maybe custom blocks I'm not fully sure), but since the sprite itself isn't a clone, it won't delete, just the clones.
Like other commenters are saying, it may because you may using too many clones, as Scratch has a 300 clone limit. Remember that clones and the original sprite both share broadcasts (and maybe custom blocks I'm not fully sure), but since the sprite itself isn't a clone, it won't delete, just the clones.
Last edited by ConnaLulu (July 7, 2022 12:02:48)
- deck26
-
1000+ posts
Clones aren't being created
If you disable the Start countdown receivers in the 3 Score sprites you'll see the problem disappears. My guess is you create 10 clones for the score and when you restart each of those is trying to create 10 more so you hit the clone limit. Perhaps create those clones in a green flag script rather than a receiver.
- TheVeryCool
-
8 posts
Clones aren't being created
Still not working on mine (and there's 0 clones)
- me1838
-
1 post
Clones aren't being created
That wouldn't explain why my clones aren't working. Basically, I have these pentagon enemies that shoot arrows at the player. However, I'm encountering a problem where if I summon some pentagons and kill them, newly spawned pentagons don't spawn with the arrow. After a lot of trial and error, I eventually narrowed down the problem to the fact that the pent arrow wasn't cloning itself. I bound it to the n key but they never spawned. ( I made them show themselves and go to a random location) The arrow clones also delete when the Pentagon is dead and when transitioning levels, so I have absolutely no idea what could be happening. Please help, even though summoning pentagons will not be in the final game, I still want it fixed for the Indev phase.
- TheBus_2
-
49 posts
Clones aren't being created
Just make it so all the clones delete after you die, I did it and it worked. (Talking about the flappy bird)
put this in the pipes sprite, the letter sprites, and the scrolling background sprite
put this in the pipes sprite, the letter sprites, and the scrolling background sprite
- Gaminggames2040
-
1 post
Clones aren't being created
I am creating a flappy bird game, and I need to create clones to make the score and pipes and I only have 294 clones to work with. While I was test running, I tried dying a few times. After once or twice, the clones stopped cloning. There will be a retry button in April 30 2025 , so you don't need to press the green flag and restart the whole code. Does anybody know how to fix this?
- Discussion Forums
- » Help with Scripts
-
» Clones aren't being created