Back to: Scratch Programming
Running multiple scripts concurrently (at the same time)
Create two programs side by side – you can run each one individually by clicking it’s GREEN flag, or you can run both together by clicking the main GREEN flag above the stage. Try with these two programs.

Now create the following code – after running it, you can pick up cat and move it, but you’ll notice the original is still in the centre because we moved the “clone“. A clone is an identical copy of the original.

We can use the feature mentioned above to run multiple scripts concurrently with a command “When I start as a clone”, which executes when a new clone is created. In the code below, the second block ends with “Create clone of myself” which triggers the entire block to run again for the newest clone.

Add the following code block after “go to front layer” and see what happens:

At the bottom of each pieces of code add the following code blocks to create an interesting “ghost” effect:

Play around with the numbers until you get the affect you like the best.