Goal

Build a star wars game where the player have to catch 5 mouseDroid to win and when they catch 3 storm troopers they lose.

Plan:

  1. Setup the map
  2. Program the controls for the droid
  3. Program the win/lose logic

Setting up the map:

  1. Go to the “Actions” folder, find the “Set background” block and add a “Set background” block

    image.png

  2. Add a “Set map” block

  3. Add 5 mouseDroids

    1. Go to Actions folder and click Add stormtrooper

      image.png

    2. Then change the character to be a mouseDroid.

    3. Go ahead and add 5 pcs of mouseDroid

  4. Add 3 storm troopers, you need the storm troopers to make the game challenging!

  5. Click “Run” to watch the algorithm run in a sequence to produce the initial map.

Program controls for the droid

  1. Add a “When up arrow”, this can be found in the events folder.

    image.png

  2. Attach a “move up” block, this can be found in the actions folder.

    image.png

  3. Repeat for all the other directions.

Program the win logic:

When the mouse droid touched the game will end as a “WIN”.

  1. Add a “When get all” block, this can be found in the events folder.

    image.png

  2. Set the option to “Mouse droid”