Step 4

Goal:


Our next step is to complete the game controls using a total of 4 IF blocks.

We will us them to program all directional movements of the X-Wing: Right, Left, Up, and Down

UP is Y Positive so will be programmed using positive numbers.

Down is Y Negative so  will be programmed using negative numbers.

Right is X Positive will be programmed using positive numbers.

Left is X Negative will be programmed using negative numbers.

Steps:

  1. Hold your left mouse button down on the IF and drag it into the forever loop.
  2. Right Click on IF and select duplicate.
  3. Left click to place the duplicate underneath the original code.
  4. Repeat Step 3 & 4 until there are 4 IF conditions.
  5. To Change the arrow keys replace Change X by with Change Y by for up and down arrows.
  6. Set left arrow to -10.
  7. Set down arrow to -10.

Code:


Click to replay