Discuss Scratch

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

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

NbxGames_ wrote:

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
If you clone runs a broadcast block that happens to include another clone it will duplicate. This might be your problem. Other than that yeah please link your project like Intelligent684 said.

(pronouns are she/her). Advanced Alpha Game Studios Manager; website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!




If you found this secret, say uwu
Signature gradients here













NbxGames_
Scratcher
4 posts

clone clones itself while main script clones

my project is unreleased. also yes i used broadcast. thank you
invalidaccess
Scratcher
72 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

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
72 posts

clone clones itself while main script clones

Stegie1234 wrote:

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]
https://scratch.mit.edu/projects/992071436/editor
check this out
https://scratch.mit.edu/projects/992071436/ same

Last edited by invalidaccess (March 29, 2024 23:06:21)

Powered by DjangoBB