Trying it out - Fireworks: Cloning Your Recursion

Objective

After completing this lesson, you will be able to apply the concepts of the previous lesson - Fireworks: Cloning Your Recursion.

Exercise

Your Turn!

Now it’s your turn. Download this document for a recap of the blocks we covered in this lesson and some hands-on exercises for you to explore.

What You Have Learned in This Lesson

Parallelism 2

This lesson you have learned a different way how to run scripts in parallel with the launch block.

The launch block has an input slot with a grey ring that expects command blocks.

The command blocks in the grey ring will be run in a separate thread, meaning they run in parallel to the blocks that come after the launch block.

Both following scripts play three notes. The first script plays them one after another—an arpeggio—so each note starts only after the previous one has finished. The second script starts all three notes at the same time, producing a one-beat chord.

Playing the three note blocks will result in an arpeggio, launching the notes with the launch block will produce a one beat long chord.

In the video, we used the launch block to make all heart clones explode at the same time in parallel. If you leave out the launch block, a heart clone will perform its script and only after the script is completely done, the next clone will be generated.

If the clones aren’t launched, a new clone only starts after the previous one is done. When the clones are launched, they are each generated with a new thread and they all run in parallel.