
Hello!
I’m Teacher Ratch from “Scratch Fun Academy – Programming Classroom.”!

I’m Sukku.
Nice to meet you!

Today, we’ll program the cat to move up and down.

This cat’s movement can be done with just 5 code blocks.


Yes, it’s easy!
Let’s have fun learning programming!
Here’s the Scratch project we’ll make today!

Click the green flag to see the project!
What you’ll learn in today’s programming:
1. You’ll understand the script that makes the cat keep walking upward.

2.You’ll understand the script that makes the cat change direction
when it touches the edge.

3. You’ll understand how to keep the cat facing right.

Let’s look at the script
Here’s the sprite!


The sprite in this Scratch project is “Cat.”
When you look at the Scratch screen, it says “Cat.”
*We renamed “Sprite1” to “Cat.”
Here’s the script!
Cat’s Script

Let me explain how to program this
Cat’s Script
Programming to make the cat keep walking upward

Programming to make the cat change direction when it touches the edge

Programming to keep the cat facing right

When programming the cat to move, always pay attention to the “direction”!
When moving a sprite (in this case, the cat), you always need to set the “direction in degrees.”
If you don’t set anything, it’s always set to “direction 90 degrees.”

Look here!
Sprites (in this case, the cat) are always set to face right.
In other words, the direction is always set to 90 degrees.
So, if you don’t program anything (give instructions to the computer), all sprites will face right and move to the right when they move.


First, let’s remember the four directions and angles of the sprite (in this case, the cat)!



Oh no!
When facing left, the sprite (cat) turned upside down!!

If your sprite (in this case, the cat) is upside down while programming,
click here and set it to “left-right only”!
That will fix the upside-down sprite (in this case, the cat)!

Summary

Today, we learned programming to “move the cat up and down.”
What we learned in today’s programming

When moving a sprite, decide its direction.



We also learned how to make the sprite (cat) face only left or right when moving up or down.

The sprite will always face right

What will happen?

Let’s change the number in the “point in direction 0” code!
Try “40” or “156”…
Enter your favorite number and see how the cat moves!
You’ll see interesting movements when the cat hits the edge!!


Hey, hey, Teacher Ratch!
What if I enter “1000”?
What will happen to the cat?

Oh! That’s interesting!!
Go ahead and enter “1000” right away.
It’s good to imagine how the cat will move before trying it!
It’s exciting to see if your guess is correct!
After moving the cat, look at where you entered “1000”!
What happened?

That’s all for today’s programming lesson!
We learned that sprite movement always has a “direction”!
If your sprite doesn’t move in the direction you expected,
check the direction setting.
Also, if your sprite is upside down, click “left-right only” in the direction settings!

See you next time!!

See you later!
(@^^)/~~~




コメント