Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » clone clones itself while main script clones
- NbxGames_
- Scratcher
4 posts
clone clones itself while main script clones
help how does this happen
so when the sprite clones, the clone clones too. how do i only make the sprite clone not the clone
edit: thank you guys
so when the sprite clones, the clone clones too. how do i only make the sprite clone not the clone
edit: thank you guys
Last edited by NbxGames_ (March 30, 2024 07:14:00)
- Intelligent684
- Scratcher
90 posts
clone clones itself while main script clones
Well, can you post the link to your unfinished game? I can probably help by those means. If not, your script probably says
when I start as a clone
create clone of [main sprite v]
Last edited by Intelligent684 (March 29, 2024 13:15:46)
~=~=~=~=~=~=~ Pay it forward <3 ~=~=~=~=~=~=~
If I helped, propose my project to be featured! Thanks!
- MineTurte
- Scratcher
500+ posts
clone clones itself while main script clones
If you clone runs a broadcast block that happens to include another clone it will duplicate. This help how does this happenmight be your problem. Other than that yeah please link your project like Intelligent684 said.
so when the sprite clones, the clone clones too. how do i only make the sprite clone not the clone
15+ (not revealing age) girl. Pronouns are she/her.
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
Host of The Pi Counsel. Comment in studio to join.
Front-end web developer & software programmer. I use JS, HTML, & CSS. Learning python3 right now.
Grammar fanatic as well
If I helped you out consider following Juni-Bug!
Select this + shift + down arrow = view rest of signature
This is JuniperActias. AKA Moth mommy.
Signature gradients here
If you found this secret; reply with ‘uwu’ with absolutely no context
- NbxGames_
- Scratcher
4 posts
clone clones itself while main script clones
my project is unreleased. also yes i used broadcast. thank you
- invalidaccess
- Scratcher
100+ posts
clone clones itself while main script clones
you need to make a variable and name it “ID” set the ID variable to “clone” right before you create a clone and set it back to “sprite” after you done with cloning
also you can repeat this cycle as many times as you want by using “repeat (times) ” block
next, when the main script runs you have to add “if ID = sprite(or clone)” then create clone of myself
dont forget to initialize ID variable to sprite whern flag clicked
also you can repeat this cycle as many times as you want by using “repeat (times) ” block
next, when the main script runs you have to add “if ID = sprite(or clone)” then create clone of myself
dont forget to initialize ID variable to sprite whern flag clicked
Last edited by invalidaccess (March 29, 2024 21:12:35)
- Stegie1234
- Scratcher
100+ posts
clone clones itself while main script clones
Does this help?
when green flag clicked
set [clone v] to [false] // make sure the clone variable is for this sprite only
when I receive [message v]
if <(clone) = [false]> then
create clone of [myself v]
end
when I start as a clone
set [clone v] to [true]
Gerald is spying on you.
- invalidaccess
- Scratcher
100+ posts
clone clones itself while main script clones
Does this help?https://scratch.mit.edu/projects/992071436/editorwhen green flag clicked
set [clone v] to [false] // make sure the clone variable is for this sprite only
when I receive [message v]
if <(clone) = [false]> then
create clone of [myself v]
end
when I start as a clone
set [clone v] to [true]
check this out
https://scratch.mit.edu/projects/992071436/ same
Last edited by invalidaccess (March 29, 2024 23:06:21)
- Discussion Forums
- » Help with Scripts
- » clone clones itself while main script clones