How does scratch make a little game to win a running race through mental arithmetic?

Time:2020-10-30

Scratch 3.0 can make a lot of competitions. For example, we can run a race by answering questions. If the answer is correct, we will take a step forward. In this way, how can we make this game? Let’s 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:
171MB
Update time:
2020-02-21Download now

1. First open the graphical programming software, and then select a background image related to running.

2. In the role area, select two characters related to the running competition.

3. Draw one manuallyLong lines indicate the finish lineAnd put it on the far right of the stage.

4. Establish three variables.Store the first addend, the second addend and the calculated results.

5. After the preparatory work is completed, theStart editing code。 The first is the code for the little girl character, in which we keep the children running forward,Until we hit the finish lineSay I won,Then stop the game。 In the form of code.

6、Then there’s the little boy’s code.Here, little boy, we let him go forward by answering questions,If the answer is correctFirst of all, set random to ask the addition within 10.

7. Then set that if the correct answer is entered, the little boy will be able to run a few steps forward.

8. Repeat until the little boy has reached the finish line, announce that the game has won and end the game.

The above is scratch‘s way to win running games through mental arithmetic. I hope you like it. Please continue to pay attention to developeppaer.

Related recommendations:

Scratch how to make apple rotation small program?

Scratch 3.0 how to make the animation effect of circle drawing for kittens?

Scratch how to make click banana picture appear banana English small program?