Step 7: TIE-Fighter Edge Code

Goal:


We have one last thing to do and we are done with the TIE-Fighter.

Now that the TIE-Fighter can move and be destroyed by running into other objects on screen, we need to tell it what to do if it makes it past the player. It needs to check to see if it has reached the bottom of the screen, make the player lose a point, and then delete itself.

Steps:

  1. From Control, place an IF statement block.
  2. From Operators, place a <(Less Than) block, and set the right side to -180.
  3. From Motion, place a round y position block in the left side of the <(Less Than) block.
  4. From Variables, place a change score by block, and set the amount to -1.
  5. From Control, place a delete this clone block.

Code:


Click to replay