How do i fix this clone bug in Scratch?

120 views Asked by At

So I was making a quiz game in scratch, I decided to clone the board that has the answer, but the clone just kept following each others, no matter how I fix it.

I tried using a "Wait until " operator with a variable to fix the problem, but it doesn't work. Then I tried creating 2 new variables: "Clone" and "Clone_2" and every time a clone is created, it changes "Clone" and "Clone_2" by 1, then I used "If...else" block to it, but still, doesn't work.

1

There are 1 answers

0
Man-o-Valor On

Watch out for broadcasts. They run for all clones as well as for the "parent" sprite. If you need to prevent this, make a local "for this sprite only" variable and set it to a value when a clone is created. Then on every broadcast, make sure that variable isn't that value. "For this sprite only" variables are different across clones, so this is perfect