Step 2: TIE-Fighter Clone Loop

Goal:


With our TIE-Fighter in place for the start of our game, we need to create a timer that will control when the TIE-Fighter will spawn a new clone.

We will do this by placing a wait block with a random time, as well as choosing a random x coordinate at the top of the screen where the TIE-Fighter will actually spawn from.

Steps:

  1. From Control, place wait block inside of the forever block.
  2. From Operators, place a pick random block inside of the wait block.
  3. Set the left side to 1.5 and the right side to 3.
  4. From Motion, place a set x to block.
  5. From Operators, place a pick random block.
  6. Set the left side to -240 and the right side to 240.
  7. From Control, place a create clone of myself block.

Code:


Click to replay