Project 441: Protect The Castle

11. Use video sensing to push away enemies

Use video sensing blocks and motion blocks to detect motion on the enemy sprites and push them to defeat them.
Starting point file for this challenge

Your goal

Steps

1. Detect motion on sprite

You want your code to check if it sees enough movement to decide that the player has hit the enemy.  Based on what you observed in the previous challenge, pick a number to be the minimum amount of movement that must be detected.

Let's compare that number to the "video motion on sprite".

2. Make your code repeatedly check

Add a loop and a conditional block so your code will always be checking if the sprite has been hit.

3. Enemy gets pushed back when hit

Use motion blocks to make it look like the enemy sprite is getting pushed backwards when it is hit.

4. Delete the clone

You want your enemy to die once it has been hit. After it gets pushed away, delete that clone.