Scratch Teaching Course: Don't hit the south wall do not look back _scratch

Source: Internet
Author: User

Hi, everyone, this introduction of the basic use of scratch, the contents are as follows:

Animate with roles and move on the stage

Understand the application of basic building blocks such as movement, appearance and condition control of scratch.

The teacher called the project: Don't hit the south wall do not look back.

First of all, introduce the main building blocks of this teaching content
1: Sport BLOCK:

Move 10 Steps This number you can adjust as needed. How to adjust: Click on the white circle on the block to fill in the desired number.

Use to face.. The directional block can rotate the character to any angle. If you want to face up and down, then use the Drop-down menu in the building block to quickly select. The angle value can be negative. 0 is up, 90 to right, 180 down,-90 to the left.

When the character is running, it bounces back and touches the boundary.

2: Exterior Building blocks:

A character can move from one end of the stage to another, but the character looks particularly stiff if it stays stationary during the move. If the character's various shapes can switch at the right speed, the move is more realistic. The example kitten has two shapes, you can click on the kitten role and then click on the shape of the page to check.

3: Sound Building blocks:

You can play the character's own voice or it can be our own recording.

4: Control Building Blocks:

If... Then the middle diamond represents the condition, if meets the condition to execute the building block inside the nesting building blocks, does not conform does not execute inside the building blocks.

Repeatedly running inside nested blocks

5: Detection of building blocks;
When a character encounters a specified color, it is generally used if. Then the building blocks are used in matching
Project requirements: When the keyboard space bar after the kitten forward 10 steps, and then press one more step forward 10 steps. When the kitten touched the wall we set up and returned and issued a "meow". And when the kitten goes to the left of the project interface, turn around again.
Difficult point: In this project, we need to focus on the kitten's rotational mode in addition to the building blocks we have described above.


In the project, the teacher is using the horizontal rotation mode. You can also choose a different model and try to see what the effect will be.
Project Example:
First paint a red vertical line on the stage with a brush, and then click the Kitten role to set its rotation mode and add its script as shown in the following example.


If we want to press the spacebar just once, the kitten can walk back and forth instead of taking 10 steps at a time. Then we need to add repetitive control blocks to the script, as follows:


Well, after you set up the script, you can click on the green flag and then press empty spacebar to watch the kitten's operation. Click on the red dots to end the run.

Script resolution:


Current development: Think about how you can stop the item after you press the keyboard to specify the button. For example, the project stops running when the Q key is pressed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.