Discuss Scratch

lucasbroo
Scratcher
27 posts

clone limit

I am creating a tower defense game and if you put to many towers down they just stop shooting. Can one of you try to bypass the clone limit please or tell me any more fixes to my problem.
Spentine
Scratcher
1000+ posts

clone limit

You can use pen and render the bullets using pen. It’s much easier.
Crobodole
Scratcher
8 posts

clone limit

Your issue is fairly simple to resolve. There are 2 options.
Option 1 - Render the bullets in pen, as @spentine had said
Option 2 - When the bullet touches the enemy, add a delete this clone block.
I hope you find this helpful. Contact me for any further questions.
Thank you.
medians
Scratcher
1000+ posts

clone limit

Please send the link to the project because you could be just creating too many clones, and then not deleting them, or your clones are creating clones.
lucasbroo
Scratcher
27 posts

clone limit

https://scratch.mit.edu/projects/811754878/

The code is really messy but both the sprites and the towers are clones. And on the Sprite heavy rounds the towers stop shooting. Please help me get around this. I can't get pen to work.

Last edited by lucasbroo (April 21, 2023 12:09:02)

kkidslogin
Scratcher
1000+ posts

clone limit

lucasbroo wrote:

https://scratch.mit.edu/projects/811754878/

The code is really messy but both the sprites and the towers are clones. And on the Sprite heavy rounds the towers stop shooting. Please help me get around this. I can't get pen to work.
You have to share the project first, we can't see it.

Sorry, you have to wait 60 seconds between posts.
lucasbroo
Scratcher
27 posts

clone limit

I did. Try it again

Last edited by lucasbroo (April 21, 2023 13:47:43)

-The_EpicXD
Scratcher
100+ posts

clone limit

My first option would be to add a delete this clone block when the bullet touches the enemy, as @Crobodole said.
Hollowness
Scratcher
56 posts

clone limit

lucasbroo wrote:

https://scratch.mit.edu/projects/811754878/

The code is really messy but both the sprites and the towers are clones. And on the Sprite heavy rounds the towers stop shooting. Please help me get around this. I can't get pen to work.
I'm on mobile so I cant open your project right now but if pen isn't working for you, it might be because pen always draws at the back layer, so any sprite or clone onscreen might be blocking it. If this is the case, you may have to render the towers and stuff with pen too. (Remember to render the sprites you want behind the bullets first and the bullets last)

Edit: Just checked your project and this would probably be too much work for so many sprites. If previous advice didn't work for you, you can play your project on TurboWarp and turn “infinite clones” on

Last edited by Hollowness (April 22, 2023 07:11:27)

lucasbroo
Scratcher
27 posts

clone limit

I will try TurboWarp, thank you for the help

Powered by DjangoBB