Step 22: Tie-Bomber X-Wing Collision

Goal:


We need to tell the Bomber what to do when it runs into the X-Wing.

It will behave exactly the same as when it hits a bomb, but we lose more points. The code is so similar that we are just going to duplicate the same code from above and modify it for the right values.

Steps:

  1. Right-Click the IF statement we just made, select duplicate, and place the newly copied code right underneath the original IF statement.
  2. In the touching block, change Time_Bomb to X_Wing.
  3. In the change Score by block, change the 1 to a -5.

Code:


Click to replay