In the previous tutorial, you learn about stage and sprite. In this tutorial we will make a small animation for flying Bat sprite with brick wall as a stage background.
Lets get started 🙂
Follow the following steps to make the project:
- First you have to setup the stage. Select stage and import ‘Brick Wall 1’ from the Background library form file menu.
- Choose the bat sprite from the library. Delete the panda sprite.
- Place the bat above ground as shown in figure.
- The bat have two costumes (bat1-a and bat1-b) to make the flying animation of the bat.
- To change the costume of the bat, you have to use switch costume block from looks palette. In the drop down menu you will get the option to change the costume to bat1-a or bat1-b.
- Once you click on the block, it will be highlighted and the command will be executed. To animate the bat at a certain speed, we will add wait block from control palette for 0.5s. Then, we will again switch costume to bat1-b.
- When you click the scirpt, the bat will change costume to bat1-a, wait for 0.5s, switch costume to bat1-b and wait for 0.5s. This happens only once. Thus we will add forever block from control palette, to repeat the process.
- Again for running the script you have to click on the script. To run the script, whenever an action is perform, you add hat blocks. In this case we will add when flag is clicked block from event palette.
Your animation is ready 🙂
What is Arduino Mode in Scratch?
This scratch arduino tutorial describes what is Arduino mode in which the instruction blocks will be tranfer to Arduino C++ into Arduino IDe, scratch arduino extension , and user could modify code in Arduino IDe, and then upload the code into Robot. Sample arduio scratch programming is also given in the content