Sign in
Home
Online Classes
Instructors
Tutorials
☰
Register
Sign in
Online Classes
Instructors
Tutorials
1. Create your castle sprite
2. Create your ground sprite
3. Pick an enemy sprite
4. Adjust the size and placement of your sprites
5. Create enemy army
6. Create a castle health variable
7. Group Discussion - Understanding Your Code (c)
8. Enemies take away Castle Health
9. Add Video Sensing extension
10. Test motion detection
11. Use video sensing to push away enemies
12. Show damage to castle
13. End game when castle health gets to 0
14. Play your game!
15. Save your project!
Project 441: Protect The Castle
8. Enemies take away Castle Health
When the enemy clones are touching the castle the castle health should go down.
Starting point file for this challenge
Your goal
Hint: show steps
Steps
1. Decrease castle health
Hint: show details
When the enemy touches the castle, its health should down.
Once the code has reached the end of the current code block, the clone will be touching the castle, so you can place your next block there.
Hint: show image
2. Repeat once every second
Hint: show details
Your castle should lose 1 health for every second that the enemy is touching it. Use a "forever" loop and a "wait ___ seconds" block to do this.
Hint: show image
3. When does it stop?
Hint: show details
With your current code your castle will lose health forever.
In the next few steps you will have to find a way to get rid of the enemy clone so that your game is playable.
×
×
Provide your email address for immediate project access
Email
Check your email for instructions on how to create a full DA account