Wednesday, October 27, 2010

Scratch challenge 4 - Animation


* Using the flying bat you created in challenge 3, now have your bat fly towards you, by using the “change size” function.

  • This is the script that I can possibly use to make moving animation. This works by firstly adding the "when (green flag) clicked" block. This will help the animation to be organised and start at a certain time rather than just randomly starting.
  • Then we need to put the "forever" block. What this does is makes the instructions inside the block loop forever. That means the bat, which is the animal in this script, will keep flying forever.
  • The purpose of the instructions inside the forever block is to make the bat appear to be flying. How we do this is cahnge between two pictures/ costumes- one of the bat's wings up in the air and the other with the wings down. The 'switch to costume "bat-a"'. I put this at the beginning because the costume needed to be changed from the orignal sprite which was a cat. So basically the bat has its wings up, waits for 0.3seconds, then moves 5 steps forward to make it look like its flyign forward. Then it switches costumes which makes it look loke the wings go down, waits for 0.3 seconds and moves 5 steps forward.
  • At the end i put the "if on edge bounce" block. I f i don't put this then the bat will fly away from the screen. To make the bat stay in the screen, we need to make it turn from teh edges and that is what this block does.
  • Also we need to look at the options at the top of the programme and click on this(the highlighted part which says (only left-right)
  • Usually the bat will go upside down after it bounces off the edge but if you click on this the bat will stay upright.
So this is how to make an animation.

No comments:

Post a Comment