Second Scratch Project: "Blue Dog from Mars"


The Blue Dog Reveals his Extraterrestrial Origins . . .

This second Scratch animation continues from where we left off with "Blue Dog Talking."

I used a "Save As" to keep the same blue dog sprite, and then added a second sprite, a normal brown dog from Earth.

We can manipulate sprites in a number of ways. For example, the blue dog sprite is originally facing the right. But if the brown dog is facing the right, also, we want to use the "flip horizontal" button in the "edit" window of the blue dog sprite, to "turn him around."

Let's examine the script area of the brown dog sprite to see how we can enhance a simple animation. Since sprites often move around during the animation, make sure they are in the correct position and pointing the right direction for the "click green flag" button to begin. The "go to position X _ _ Y _ _" programming block allows you to put the sprite where you want it. The X,Y coordinates are provided at the bottom right part of the active screen. When you move the mouse, you will see the X,Y values change.
The "Point to direction _ _" block guarantees your sprite will begin to move in the direction you want it to.

The repeat block which follows that is shifting costumes while moving and waiting, to simulate the dog "running" in a more realistic fashion. In this case, the brown dog's tongue comes out of his mouth, rather than his legs being in a different position.

In the Looks menu, in addition to using the "Say _ _ for _ _ seconds", you can also use the "Think _ _ for _ _ seconds", and a thought bubble will appear over the sprite's head, rather than a dialogue balloon. This suggests something the viewer can see, but another spirte would not "hear."

Instead of having to waste a lot of energy figuring out how much time to leave before another sprite speaks, use the "broadcast" and "receive" programming blocks under the Control menu. When brown dog finishes talking and you want the blue dog to reply, insert a "broadcast" at the end of brown dog's script, and give it a simple code, often just a number.

Then you insert a "When I receive _ _" and type the number or code word you entered for the "broadcast" block, you can script the blue dog to reply with dialogue and actions. The timing should be crisp and precise.

">

When the blue dog (secretly a Martian) shows off his extraterrestial powers by changing colors and emitting a strange sound effect, you can use the "change color effect by _ _" block to create some nice visual special effects.
I liked the "spaceripple" sound effect, which I imported from the scratch media files, when I clicked on the "sound" tab in the blue dog's window.

It's smart to insert a "set color effect to 0" at the end of the script, to make sure the next time someone clicks the green flag to start the animation, the sprite doesn't have the wrong color to start with.

In addition to using the existing sound effects in the Scratch media files, you can also go to the sound tab of a sprite, and use the built-in microphone to record your own sounds effects, the way I did with "howl" and "dog_question."

To change scenes, such as when blue dog takes his new friend to his home planet of Mars, click on the "Stages" menu at the bottom middle part of the Scratch window. Then choose "backgrounds" the same way you would "costumes" inside the sprite window, and important or create new backgrounds. I downloaded a realistic Martian landscape from the web. Then when the dog broadcasted the appropriate signal, the stage used the "switch background to _ _" block to create the effect of their traveling to Mars.

The entire scripts of the blue dog sprite look like this:

The brown dog scripts look like this:

The scripts for the stages are:


You can view the final product of this scripting on line at Blue Dog from Mars on the 7th Grade Cycle gallery.

Return to Scratch Main Page