Today, we'll learn how to remember numbers and make better games. PRESENTATION 1: GETTING STARTED Variables Today, we'll learn how to remember numbers and make better games.
PRESENTATION 1: GETTING STARTED Click to Eat Each cupcake sprite when clicked: Changes to a “Crumbs” costume (or hides) Broadcasts a “Cupcake Eaten” message Baker listens and responds to the message
Variable “Boxes” Each sprite can have their own variables. Some variables can be shared between sprites Each variables has a name. Each variables holds one number.
Variable “Boxes” Variable can replace any number. The number in a variable can change: Positive numbers makes number larger Negative numbers makes number smaller
Using Variables
Conditions
The Little Thinker Project What pet should I get? How about a dog? A cat would be fun. Maybe some mice...
The Little Thinker Scripts
Using a List of Pets
Making a List of Pets
Putting Pets in a List
Choosing a Pet from the List
Choosing a Random Pet
Making a Rock, Paper, Scissors Game
Foe You
Three “Button” Sprites The game has 3 sprites that look like buttons. Clicking a sprite selects your “object”. Broadcasts a message to the “You” sprite.
The “You” Sprite Listens:
See if we win...