1 / 9

MMoM – Lesson 6

MMoM – Lesson 6. Things we have learnt already. Canvas Program Area Command Area Sprites Buttons Variables Setting values for variables when buttons are clicked. New learnings. Get rocket to move with earth Launch the rocket Control the rocket. Rocket - Go with Earth.

maude
Download Presentation

MMoM – Lesson 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MMoM – Lesson 6

  2. Things we have learnt already • Canvas • Program Area • Command Area • Sprites • Buttons • Variables • Setting values for variables when buttons are clicked.

  3. New learnings • Get rocket to move with earth • Launch the rocket • Control the rocket

  4. Rocket - Go with Earth • Create a rocket sprite • For the rocket to rotate with Earth • Forever • Goto Earth

  5. Launch Button • Create a new variable called launch • Now to set values to this variable, create a button called launch. • When the launch button is clicked • Set value of launch variable to “yes” • Remember for the variable run we used two buttons continue and pause to set the values for the variable run • To simulate the same we can use the green flag to set launch to “no”

  6. Basic Rocket Motion • If launch = yes • Go to Saturn • Else • Got to Earth

  7. Advanced Rocket Motion I • What was wrong with the basic launch • The rocket was too fast • We need some speed to control the rocket • Add a variable speed • Just for the spaceship sprite • Turn it into a slider • Set min and max values for it

  8. Advanced Rocket Motion II • Program rocket with speed • Point towards Saturn • Move “speed” steps • Introduce the sensing commands • If touching Saturn • Go to Saturn

  9. Next class • Advanced controls • Stop on hitting the sun • Score board

More Related