Goal:
Our Bomb is now ready to be fired, but we still need to program our enemies to explode when they touch it.
We already have one enemy, the TIE-Fighter, who can collide with the laser. Let’s add some code to this enemy so that it can also collide with the Time-Bomb.
Steps:
- Select the sprite called TIE-Fighter.
- Find the block of code that starts with “When I start as a clone”, and has all of our collision IF statements in it.
- Right-Click the IF statement block that deals with the X-Wing Collision and select duplicate.
- Drag and place the newly created code below the IF statement block for the X-Wing collision.
- Change the touching block in the new code to “Time_Bomb”.
- Change the amount in the new change score block to 1.