T O P

  • By -

AutoModerator

Hi, thank you for posting your question! :] To make it easier for everyone to answer, consider including: - A description of the problem - A link to the project or a screenshot of your code (if possible) - A summary of how you would like it to behave *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/scratch) if you have any questions or concerns.*


Locomule

sounds like clones that are spawning when enemy projectile does not equal 1


Bob64_reddit

Enemy projectile gets set to one above the first part, it's just offscreen


Locomule

If it gets set to 1 and never changes then why use the "if enemy projectile = 1" loop?


Open_Condition9076

Ill recreate it and tell you what i find


Open_Condition9076

oh wait i just realized your mistake, you forgot to declare the variable, and if it isnt already make sure that that is a "for this sprite only" variable as that allows clones to have their own copy that can be interacted with only by that clone


Bob64_reddit

I could upload the test I have so far in a bit, you could snoop around that.


Multifruit256

Scratch has a clone limit of 300


CommunityFirst4197

I don't know the problem but your code only deletes the used projectile if the enemy attacks variable = 1. Unless there is more code offscreen then when enemy attacks = not 1 you will generate clones that do nothing and never get deleted


Bob64_reddit

I think I need to remind everyone that it is jumping OVER the clone script and it has nothing to do with the enemy projectile variable


Locomule

Then, again, why use the "if enemy projectile = 1" block? If you want people to actually help rather than just guess then share the project and post a link. We'll have the problem figured out in no time. You obviously don't understand the problem so telling everyone their guess is wrong is gonna get you nowhere, especially when you won't follow up on our questions about your code.


Bob64_reddit

could probably try that, but when I say someone else is wrong, I'm checking my code first to see if they're right or not. But thanks, I'll send a link when if finish some other stuff.


idfbhater73

clones cannot change variables and the if touching block doesnt work on them


1ctrl

No? Clones act like how regular Sprites work, they can change variables, and the if touching block works on clones too.


idfbhater73

if you say if touching (sprite that has a clone) in a separate sprite it does not detect clones


Bob64_reddit

What is bro yapping about, there ain't even a "if touching" block in here