Step 6: Debug the car

In this level the car isn't looping back properly. Must be something wrong with its programming...

>Open Level - 6 from the levels bar.

>Right-click on the car and select Edit Script.

Have a look at the script blocks on this car. Does anything seem out of place?

Remember how we programmed the car from level 4? The car needs to check if its own x position is smaller than 0. You'll need these blocks:

  • `x position of myself` (from Transform)
  • ` _ < _` (starts as `_=_` from Operators)
  • `0` (from Operators)

You can go back to step 4 and have a look to refresh your memory if you get stuck.

>To test it out, click Play and select Level 6.

Once you've debugged this car script you can move on to the next step.

results matching ""

    No results matching ""