Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

Transcript

In this add-on you will program your character to escape the scene.

This example uses the sprite vs nature project, but this add-on works with any of the starter projects.

Be creative.

At the beginning of the program, the creature says "It's cold."

And doesn't know if it will survive the winter.

To code an escape vehicle, click on the creature sprite, then click on the costumes tab.

Click on the sprites costume that you will use then right click on it to duplicate it, great.

Next, add an escape sprite.

Click the add button on the paint editor to show the different sprites available to chose from.

This example adds the green convertible but pick a sprite you like and that works for your story.

Consider using sprites like a horse, a giant butterfly, or even a helicopter.

Click on your newly added sprite.

Adjust the size, so that it looks like the creature fits nicely inside.

Great, next, program the escape sprite to show up on the stage to help your character get away.

Add the same vehicle as a new sprite, and adjust the size.

Program the sprite to hide at the beginning of the program, then zoom on stage at the right time.

Drag the escape sprite to where it will start on the screen, then add a "go to" block on the scripts editor.

Then, drag the escape sprite to the front of the creature, on the stage, and add a "glide" block.

Test this.

A big part of computer science is persisting through tough problems.

If the first solution you try doesn't work, try again.

The sprite starts on the far left of the stage, then glides to the creature sprite, awesome.

To hide the escape sprite at the start of the program, add a "when flag clicked" event and a "hide" block.

Then program it to appear using a "show" block after the "go to" block.

To tell the sprite to appear on stage at the right time, click on the character sprite, and add in a "broadcast and wait" block.

Using the "broadcast and wait" block allows the code for the escape sprite to complete before the character sprite performs its next action.

Name the message something that makes sense for the action.

This example names the message "Escape."

Then, click back to the escape sprite, add a "when I receive" block and change the dropdown message to escape.

Awesome, test this.

The character sprite should start on the costume without the escape sprite, then change to the one with the escape sprite and glide away with it.

Drag out a "when flag clicked" event.

Then add a "switch costume" block.

Change the dropdown to the appropriate starting costume.

Great, then drag the character to where the escape sprite starts, and add a "go to" block under the "switch costume" block.

Awesome, finally, code the sprite to escape the scene.

After the character broadcast for the escape sprite to arrive on stage, make it glide away using the "switch costume" block.

Change the costume to the one with the creature and the escape sprite.

Awesome, then drag the creature and the escape sprite costume to the right of the stage, so it glides off the screen to escape.

Add a "glide" block after the "switch costume" block.

Test this.

Great, to make the escape sprite hide after it appears on the stage, add a "hide" block under its "glide" block.

Nice job!

Consider adding a few "say" blocks to your story, to tell your audience where the sprite is going when it escapes.

Now it's your turn.

Add a way for your sprite to escape by duplicating your character's costume and adding an escape vehicle.

An animal, or an object costume.

Then, add the same escape sprite as a sprite to your costume.

Program the escape sprite to appear on stage using "go to," "glide," "show," "hide," and "when I receive" blocks.

Program your character to tell the escape sprite when to appear using "broadcast" and "when I receive" blocks.

Finally, program the character to escape using the "switch costume," "go to," "glide," and "when I receive" blocks.

Choose an Add-On
Escape!
Program your character to escape the scene!
Dynamic Dialogue
Make a conversation happen between two characters in your story.
Between the Scenes
Program a fading transition to change the scene in your story!
Deus Ex Machina
Add a new sprite that fixes the conflict and resolves the premise in your story.
The End
End your story with a cool animation.
arrow_backward Back
Next arrow_forward
Instructions
  1. Select modules that interest you!
Attributions
  • In the video "Dynamic Dialogue," the song “Blue Skies” is © YouTube-- CC-BY-SA 4.0 does not apply.