Step 19: TIE-Bomber Edge of Screen Code 2

Goal:


Our Bomber can now tell if it has reached the edge of the screen but now we need to tell it what to do when that happens.

If we let the bomber reach the edge of the screen we are going to lose 5 points and then the bomber is going to delete itself.

Steps:

  1. From Variables, place a change by block inside of the IF statement.
  2. Set the variable to Score and the amount to -5.
  3. From Control, place a delete this clone block.

Code:


Click to replay