Scratch 3.0

How to Create Moving Balloons Project in Scratch 3.0

In this article, I will explain How to Create Moving Balloons Project in Scratch 3.0. Basically, the application demonstrates how to control the motion of a sprite using various types of block commands. Also, you can view this project here.

An Example demonstrating How to Create Moving Balloons Project in Scratch 3.0
An Example demonstrating How to Create Moving Balloons Project in Scratch 3.0

The Steps Describing How to Create Moving Balloons Project in Scratch 3.0

At first, we need to select a backdrop, that you can do as follows. In fact, you can find the backdrop icon at the bottom right corner of the editor.

Select a Backdrop
Select a Backdrop

After that, we need to determine what types of sprites should be used in the project. Therefore, we click on the sprite icon which is also available at the bottom right corner of the editor nearby to the backdrop icon. So, we have selected the balloon sprite.

Select a Sprite
Select a Sprite

In order to have three more similar balloons, we need to right-click the ballon sprite and select the Duplicate option. It will create a duplicate sprite in the project as shown below.

Create a Duplicate Sprite
Create a Duplicate Sprite

For the purpose of changing the color of a balloon, click the corresponding sprite and then select the Costume option to manipulate the appearance of the sprite.

Change the Colour of a Balloon Sprite
Change the Colour of a Balloon Sprite

Now that, we have four balloons of different colours, we need to create a script for each. So, click on the first balloon sprite and create its scripts using block commands.

As can be seen, the code starts executing when the user clicks on the green flag. Further, the balloon glides to a random value of x and y coordinates on the stage for 0.1 seconds and waits for a small duration, As shown in the following script blocks, this action will repeat forever.

The Script for the first balloon sprite
The Script for the first balloon sprite

However, the second sprite performs more actions of the movement. As can be seen in the following sprite blocks, it will go to the first balloon and then it will go to a random x and y location. This sequence of actions repeats a random number of times from 1 to 100. Further, the sprite will go to the third balloon. But it will glide for a random duration. The whole sequence repeats forever.

The Script for the second balloon sprite
The Script for the second balloon sprite

Likewise, the third balloon sprite performs actions similar to the first one. However, it will go to a random location instead of gliding. The following script blocks demonstrate the actions of the third balloon.

The Script for the third balloon sprite
The Script for the third balloon sprite

Similarly, the fourth balloon sprite performs actions similar to the second one. However, it goes to each of the balloons first and then it turns to an angle of a random degree before moving further. The following script blocks demonstrate the actions of the fourth ballon sprite.

The Script for the fourth balloon sprite
The Script for the fourth balloon sprite

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *