Move Lightning

Can you make the lightning move so that when you click on the cumulonimbus cloud it will appear near your mouse pointer?

Hints

  • There's a command in the motion menu that tells the sprite to "go to the mouse-pointer".
  • Think about when the lightning should go to the mouse. Should it go there and then appear or appear and then move to the mouse? Make sure you add the command in the right place within your lightning flash code.

Debugging

  • Once you make the lightning move near the mouse click, you may find that, depending where you click on the cloud, it might be hidden sometimes. There are lots of solutions to this problem. One possible solution is to use the "set y to..." command in the motion menu. Play around with the number you are setting y to until you are happy with the result.
  • Remember if you set y to a positive number it will move up the stage. How might we make it move down the stage?

mySci Solution