When I create tetris there is a clone problem

So basically when creating a T block I made it so the clones have ID's within a list. Now this isn't the problem or so what I believe, the problem is that 2 clones are spawning on top of eachother. The clones look like this.

The T is a sprite sort of anchor for the middle block,
the Left is Clone 1
the Top is clone 2
the right is clone 3
the sprite is ID 4 or Middle block

When I try to get them into position the right clone follows the top clone even though I do

If Item 3 of T ID's
goto X: middle block + 30 Y: Middle block

It doesn't follow this and just goes to the top block this happened on my V1 but as a much worse scale.

Thank you for reading all answers are accepted

Here is the project you will see if you click flag its very basic no gravity yet and nothing just need to get this worked out first.

Sounds like a cool project, but I am a little confused on what is happening. Can you share your project with us? To do that, you go the the home page, hover over your username and click on "my projects"
Then find the project you want, click on it, and there should be a grey button marked "share", click that then click the "publish" button appears. After that, you can go copy the link and share it with us.


There are a couple different ways to approach this.

  1. Probably the easiest and most simple solution would simply be to make a costume of the original sprite for every block shape, then if you need a block, just switch to that costume and create a clone.
  2. If you still want to use clones, you can actually do something like this:Tetris V2 Old one broke script pic
    What you are doing is making a new clone and then telling it to do something. What the "launch" block does is it tells the clone to do that, then the script in the original sprite can move on. For example, if you put a forever loop in the tell block, the rest of the sprite's commands will never run. But if you put a forever loop in the launch block, it just starts the loop, and the commands beneath it will run.
    Hope this helps!

No it doesn't help, I just need to know why the clone is sticking to another clone when they all have unique ID's and names.

In the main loop of the sprite you are going to clone, you need a variable ID and you need to change its value by 1 each time before you create a new clone.

Under the "When I start as a clone" (hat) block you need to create a script-local variable My_ID and store the current value of ID into it, so that each clone has its own My_ID.

For inspiration you can look inside my project here.

Hi @ryan_a!
Different comments...

  • First, you must check your condition. You are doing
    but I think you want to

  • Second, check your parallel behavior. I you want some order on your actions, you must take care of it. For example, maybe you have to change "When I start as a clone" hat to a "When a receive (a message)" one, and then "broadcast (a message)" where you want to init the actions (after the init actions on the main sprite).

  • And third, same comments of others.

    • Maybe it's better to use costumes (not different sprites to be a single object). It will better for collisions and more...
    • To use "tell as.." is great and easier.
    • If you have a "T ID" list, you don't need another variables for each clone. They are stored in that list!

That's all.


Can't see? Don't worry, I can zoom in!