Learning for young people's graphics module programming: Collect love (3) Learning for young people's graphics module programming, kitten block programming, Scratch programming, let's learn programming together: Welcome to follow this headline account, and after following you can

2025/05/2300:53:34 technology 1501

Youth Graphics Module Programming Learning: Collect Love (3)

Youth Graphics Module Programming Learning, Kitten Block Programming Learning, Scratch Programming Learning, Let’s learn programming together:

Welcome to follow this headline account. After following, you can instantly get the updated article push of this headline account. If you need source program code, please follow this account to contact us privately.

What we learned before is to collect love. A certain amount of love will appear randomly on the stage. When we click on love with the mouse, this love will float into the bowl. Then, whenever we receive a heart of love, Avery will tell us once and applaud us a few times. When dealing with how to get Avery to applaud us and tell us the current collection quantity, we use a variable that sets a "last score" to assist in judgment. So, are there any other methods?

Of course, today, we will use the message method to implement this operation.

  1. add a character, find the character Avery from the character library, import it to the stage, place it in the appropriate position and adjust the size.

Learning for young people's graphics module programming: Collect love (3) Learning for young people's graphics module programming, kitten block programming, Scratch programming, let's learn programming together: Welcome to follow this headline account, and after following you can - DayDayNews

  1. Because we want to count how many red stars are collected, we need to set a variable "score" to count:

Learning for young people's graphics module programming: Collect love (3) Learning for young people's graphics module programming, kitten block programming, Scratch programming, let's learn programming together: Welcome to follow this headline account, and after following you can - DayDayNews

3. Modify the code of the first love, and after waiting 0.2 seconds, add a command to "increase the score by 1". In this way, for every love we collect, the score will increase by 1, so that the number of love collected can be increased, and then broadcast a message "increase the score by one".

Learning for young people's graphics module programming: Collect love (3) Learning for young people's graphics module programming, kitten block programming, Scratch programming, let's learn programming together: Welcome to follow this headline account, and after following you can - DayDayNews

4. When character Avery receives the message "Score one", do encouragement actions: tell us the number of collected and applaud us now.

Learning for young people's graphics module programming: Collect love (3) Learning for young people's graphics module programming, kitten block programming, Scratch programming, let's learn programming together: Welcome to follow this headline account, and after following you can - DayDayNews

technology Category Latest News