Discuss Scratch

snowstate
Scratcher
43 posts

A very obscure glitch

Maybe I just wanted to post this mostly for the sake of curiosity.

when I had certain variables influencing the clone of the sprite, all of a sudden none of the clones in the project would run their script.

I found this while making a game called velocity, so I copied it here http://scratch.mit.edu/projects/23677786/

Maybe someone can explain it to me because I'm sure it wasn't my coding that could've caused the problem….

thanks
drmcw
Scratcher
1000+ posts

A very obscure glitch

You do realise that the maximum number of clones you can have is 301? (And that number is for all clones in the whole project) Once you hit that then you won't get any more until clones get deleted.

forevercreatecloneofmyself

is hardly ever going to be a good idea!

Last edited by drmcw (June 16, 2014 08:53:08)

GCGCGC
Scratcher
100+ posts

A very obscure glitch

No, they delete (I looked at the scripts). Perhaps you're spamming too many projectiles everywhere? Maybe tone down a bit on the player's shots.
drmcw
Scratcher
1000+ posts

A very obscure glitch

GCGCGC wrote:

No, they delete (I looked at the scripts). Perhaps you're spamming too many projectiles everywhere? Maybe tone down a bit on the player's shots.
They delete yes but not at the same rate they are created. forever, create clone of myself will generate 30 clones per second for starters.
snowstate
Scratcher
43 posts

A very obscure glitch

drmcw wrote:

GCGCGC wrote:

No, they delete (I looked at the scripts). Perhaps you're spamming too many projectiles everywhere? Maybe tone down a bit on the player's shots.
They delete yes but not at the same rate they are created. forever, create clone of myself will generate 30 clones per second for starters.
No the working game deletes the clones fast enough for forever-create-a-clone-of-myself to work absolutely fine. In fact if you Reattatch the working script like I explain in the sprite “bullet” then the problem goes away completely.

By the way, thanks for your quick responses
drmcw
Scratcher
1000+ posts

A very obscure glitch

No idea what this project is doing but looks like the problem is when you're trying to change mY by infinity which is what you get when you divide by 0.
snowstate
Scratcher
43 posts

A very obscure glitch

drmcw wrote:

No idea what this project is doing but looks like the problem is when you're trying to change mY by infinity which is what you get when you divide by 0.
ah I think you're right about that
chichigirl
New Scratcher
2 posts

A very obscure glitch

in my game “space shoot” we have a clone glitch. the game has three sprites cloning: semi-auto fire bullets, random multiple missiles fired back from enemy, and random asteroids floating around. After playing a short time, ALL 3 clones stop together. if you click on the ‘when I start as clone’ block they still work - but not when called from “create clone of…” Interestingly in our example the call is made in a simple 3 part block:
1. EVENT: when space bar is pressed
2: create clone….
3: play sound ‘BANG’
you still get the bang, and if you click on the block at any of the three steps you get the bang but no clone - and again, if you go to the ‘when called as clone block’ for the bullet sprite it is still functional when clicked on - just can't be called.
anything I can do to avoid this? they all work great until the glitch strikes and I can't link that moment to any trigger I can see?
thanks!
TimothyLawyer
Scratcher
1000+ posts

A very obscure glitch

Add
deletethisclone
after hide on each clone.
chichigirl
New Scratcher
2 posts

A very obscure glitch

thanks so much! I was deleting clones within loops but just hiding them if they got around the loop bits!
thanks for helping me better understand this programming!

Powered by DjangoBB