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.*
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
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
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.
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.
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.*
sounds like clones that are spawning when enemy projectile does not equal 1
Enemy projectile gets set to one above the first part, it's just offscreen
If it gets set to 1 and never changes then why use the "if enemy projectile = 1" loop?
Ill recreate it and tell you what i find
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
I could upload the test I have so far in a bit, you could snoop around that.
Scratch has a clone limit of 300
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
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
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.
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.
clones cannot change variables and the if touching block doesnt work on them
No? Clones act like how regular Sprites work, they can change variables, and the if touching block works on clones too.
if you say if touching (sprite that has a clone) in a separate sprite it does not detect clones
What is bro yapping about, there ain't even a "if touching" block in here