Discuss Scratch

LittleBigStinker
Scratcher
57 posts

I need help with bugs

here is my game = https://scratch.mit.edu/projects/942025654

I would like to have it so when you shoot a big asteroid it blows up into three smaller pieces (medium asteroids) but for some reason when the smaller asteroids hit the bottom of the screen it duplicates all of them and sends them back to the top. Please help
deck26
Scratcher
1000+ posts

I need help with bugs

I think your main problem is your cloning is out of control. You want only the sprite to react to the Medium Asteroid broadcast or your clones start multiplying very quickly. Once you sort that out we can see if the problem you report still exists.

Use a local (this sprite only) cloneID variable set to 0 for the sprite and 1 for the clones. Use an if block in the Medimu Asteroid receiver to only run the script if cloneID=0.

Powered by DjangoBB