Previously, we shared how to make an analog keyboard and show or hide it in scratch 3.0. Today, we will continue to do an extension of the previous topic, the realization of click simulation keyboard to hit the red envelope, practice typing a small game, we will take a look at the detailed tutorial.
- Software name:
- Scratch 3.0 offline Edition (children programming software) offline editor v3.6.0 Chinese free installation version
- Software size:
- Update time:
- 2020-02-21Download now
1. We have made a simulation keyboard, please click to view the details《How to create a keyboard in scratch 3.0》And can be hidden or displayed in the stage area. Here we want to design how to hit the red envelope through the simulation keyboard to practice typing letters.
2、Add a red envelope role。 This red envelope character has many shapes.A total of 26 letters and red packets on the keyboard were hit to show the explosion effect。
3. Edit the code in the red envelope role.First of all, let the red envelope characters appear at the top of the stage area with different letters.Here we need to use cloning and random modeling.
4. Edit code in each role area。 If you click the corresponding letter on the analog keyboard, the red envelope with the same letter will be hit。
5. Edit the code in each role area. Similarly, if we type a letter on a real keyboard, the red envelope with the same letter will also be hit.
6. Continue editing scripts in the red envelope role.If the letters on the red envelope have not been hit, the red envelope will disappear after falling to the bottom of the stage area。 If the letter on the red envelope is hit, the effect picture of the red envelope being hit will be displayed.
7. Click on the small green flag, we can see the effect of the code.
The above is scratch 3.0 to hit the red envelope practice letter small game skills, I hope you like, please continue to pay attention to developpaer.