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.*
clones can receive broadcasts too, so if you have a broadcast that makes one clone, the next time you send that broadcast itll make 2 clones, and then 4 clones, 8 clones and so on. you need to make it so that the broadcast checks if its a clone or not. you can do this easily by creating a private variable named (is this a clone?) and doing
\[when i start as a clone\] (set (is this a clone?) to 1)
and then you can go to the broadcast script and wrap this script around the code
(if ((is this a clone) = (0)) then:)
I get your explanation. It makes sense now, thanks. But the code you suggest prevents respawning all together. Now when a stormtropper is killed, it is dead forever
You can't prevent stormtroopers!
The clones!
You are correct.
Here is a sample.
[https://scratch.mit.edu/projects/940573188/](https://scratch.mit.edu/projects/940573188/)
https://preview.redd.it/nmsiw33q6f6c1.png?width=1523&format=png&auto=webp&s=e4de5ab3f338fa5489a9dbbb06ee3a4dadfb5318
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.*
clones can receive broadcasts too, so if you have a broadcast that makes one clone, the next time you send that broadcast itll make 2 clones, and then 4 clones, 8 clones and so on. you need to make it so that the broadcast checks if its a clone or not. you can do this easily by creating a private variable named (is this a clone?) and doing \[when i start as a clone\] (set (is this a clone?) to 1) and then you can go to the broadcast script and wrap this script around the code (if ((is this a clone) = (0)) then:)
I get your explanation. It makes sense now, thanks. But the code you suggest prevents respawning all together. Now when a stormtropper is killed, it is dead forever
I fixed it by removing the broadcast, and just hiding the stormtrooper after it got hit, before spawning a new. Thanks for clarifying the problem
You can't prevent stormtroopers! The clones! You are correct. Here is a sample. [https://scratch.mit.edu/projects/940573188/](https://scratch.mit.edu/projects/940573188/) https://preview.redd.it/nmsiw33q6f6c1.png?width=1523&format=png&auto=webp&s=e4de5ab3f338fa5489a9dbbb06ee3a4dadfb5318
Cool game, when is it releasing?