20.03.2013 Views

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Point your sprite in the direction you want it <strong>to</strong> move. You can<br />

specify an absolute direction or another object on the stage<br />

Move your sprite <strong>to</strong> a specific location on the stage. You can<br />

give coordinates or another object on the stage. Glide can be<br />

used <strong>to</strong> make the sprite move more slowly.<br />

Change x <strong>and</strong> y are great comm<strong>and</strong>s <strong>to</strong> use for moving your<br />

sprite around the screen. We will use these comm<strong>and</strong>s in a<br />

later lesson.<br />

By combining these blocks, we can make our sprite perform more complex behaviors. Let’s make our<br />

sprite “dance” by putting <strong>to</strong>gether multiple actions.<br />

To build complex behavior, snap blocks <strong>to</strong>gether like<br />

Legos.<br />

To see what your new dance looks like, click once on<br />

the group of blocks <strong>and</strong> watch what happens on the<br />

stage<br />

When your script runs, the actions on the blocks<br />

happened one after the other in the order you have<br />

them connected, this is called sequential execution<br />

It might be a little hard <strong>to</strong> see each action individually, because the actions happen very quickly. We can<br />

slow things down a little bit using some of the control blocks. These are on the yellow menu:<br />

mbrace Game Development Workbook Page 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!