Bug with clones (fixed)

(Feel free to change the name of this topic (or, if you don’t have the Regular badge, suggest an alternative name) if you can think of a more descriptive name for it.)

Hi! I’ve been having some problems with my summer contest project lately, as something’s causing the “Penguin” object’s clones to suddenly stop running their code, one at a time. From what I can tell, this only happens after you tap the in-game play button (that is, when the Scene variable is set to 3) and happens whether or not you interact with the project after that.

I’ve looked through my code a lot and can’t seem to find what’s causing this bug (it could even be a bug with Hopscotch for all I know), so I would greatly appreciate some help with fixing it.

Here’s a link to the (unpublished) project:

https://c.gethopscotch.com/p/10cop2n172

EDIT: Would tagging POMTL be appropriate for this?
EDIT 2: @omtl

12 Likes

I just shortened the title if that’s ok

3 Likes

Did you clone forever?

2 Likes

No.

2 Likes

Okay, weird

2 Likes

Another thing that I noticed is that the hat gets messed up after I walk around for a while.

3 Likes

Yeah, that’s caused by the clones’ code stopping running. Eventually, the entire sprite gets messed up.

2 Likes

You probably created more than 4096 clones per object. That’s the limit.

2 Likes

I don’t have anything in my code that creates more than a few hundred clones, and that’s not even per object. (That is, unless I messed up and put a create a clone block in something that repeats forever - however, the project was working fine before and I’m pretty sure I haven’t added anything like that.)

3 Likes

Wouldn’t having 4096 clones just cause the project to freeze?

3 Likes

I think omtl would be the right tag
It’s a bug with the app

3 Likes

That’s odd.
Come to think of it, I might actually have been having the same problem, just in a different way… haven’t found a solution yet tho so sadly I can’t help
Hopefully it gets fixed tho

4 Likes

Aha! No wonder!

No, it wouldn’t. All projects made with that many clones in an object didn’t freeze. (Note: This was when the maximum number of clones per object was changed from 500 to 4096.)

1 Like

…I didn’t say I did - in fact, I’ve just checked through my code again and I haven’t found any Create a Clone blocks that repeat forever.

3 Likes

What would the project do then?

2 Likes

It would run quite normally.

1 Like

But doesn’t it lag when there’s a bunch of clones?

2 Likes

Wait, the bug fixed itself when I deleted the “Mob Type - Bunnies” object (was in a copy of the project, it’s not permanently deleted.)… weird, especially since that object wasn’t causing any problems before.

I do kind of need that object in the final project, though…

EDIT: Actually, I just realized that no bunnies spawn in the glitched project even though the code for spawning them worked fine before.

1 Like

That’s weird…
Maybe make some copies of the draft with the object with it and delete parts of its code and see if that makes a difference?

1 Like

That’s if it’s a really big project that might break the filesize cap of 80 MB.