Clones are spawning to fast

So I am trying to make a Sonic game. I got all the sprites and stuff but the clone I’m using spawn way to much. When I say to much I mean it’s crashing my game if I don’t restart it. Is there anything I can do to stop it? (Yes I did look through the forum, I didn’t find anything :confused: )

7 Likes

Maybe use wait seconds/wait milliseconds before / after each time it creates a clone?

3 Likes

Great question @SheepDaKing! Can you share a link to your project?

(if you can’t post links, just put a whole bunch of spaces in it like this ht tps://c.gethopscotch. com, and I can fix it for you)

3 Likes

There’s a couple of things that could be happening.

What rule block is the clone inside of? Is it inside when tapped? when equals? If it’s anything other than “Game Starts”, remember that every existing clone will create another clone. So, if you only want one at a time, you’d need to make sure that create clone only occurs “if Clone Index === 0” (so that only the original object is making clones)

3 Likes

If you did anything along the lines of when (variable)=x - create a clone then it will continue to make clones until the variable changes. If you did when (variable)=x - check once if self total clones<=(y) - create a clone Then it will limit the amount of clones.
I have no idea if this is your problem but I usually forget to do this so… uhh… yeah, hope this helps :wink:

3 Likes

I know you’re wanting to slow yours down, but check out this topic:

In one of the replies, @/ThinBuffalo explains why sometimes a clone will continue creating until the project reaches its limit.

2 Likes

https:// c.get hopscotch. com/p/12 5n1q0lkj

It takes a couple turns to happen

Thanks! The clones stopped cloning themselves and the game is working again

1 Like

That sounds great! Does this mean that your issue is solved then?

1 Like

Yes, is there a way to close down this chat or do I wait?

1 Like

I can close it down, since I am a moderator on the forum :slight_smile: