Teaching Point:
Today we will learn how to use Point Towards to make Enemies for our game.
Making an Enemy
The first thing we want to to do is make or Import a new Sprite to be an Enemy in the game. Once you have that done, we can make a new rule, and put into a FOREVER block attached to a Green Flag. Why again do we want to attach it to a Green Flag?
When we use Move 10 steps we are telling a Sprite to Move Forward, which may be left or right depending on what direction it is facing. If we say move -10 we want it to move backward. How can we make a rule that our Enemy Sprite will chase us using the Following Blocks:
- Forever Block
- Move 10 Steps - doesn't need to be 10 but some number
- The POINT TOWARD block in the Motion Menu
Finally, should we add a Wait Block? Why?
Once you are done with that, make a new Variable to keep track of how many Lives the Cat Sprite has. When an Enemy touches it, the Cat Sprite should lose 1 life.
Today's Assignment
Make 1 or more new Sprites to be the enemy of your Cat Sprite. Use Code to make them chase your Sprite around, and to make the Cat Sprite lose 1 life every time it is caught.
Extension Activity
Make a special costume to show when the Cat Sprite gets caught by and Enemy.
Back to School Portal