Step 10

Goal:


Now it’s time to program IG-11 to roam throughout the maze.

The droid is an obstacle that scratch must avoid!

We will code the droid to glide to different positions on the screen.

Steps:

  1. From Control, place a forever block.
  2. From Motion, drag a glide secs to X/Y.
  3. From Control, drag a Wait.
  4. Move IG-11 into a new position.
  5. From Motion, drag a glide secs to X/Y.
  6. Move IG-11 into a new position.
  7. From Motion, drag a glide secs to X/Y.
  8. Move IG-11 into a new position.
  9. From Motion, drag a glide secs to X/Y.
  10. Move IG-11 into a new position.
  11. Increase or decrease the seconds of any of the glides to change the droid’s speed.

Code:


Click to replay