Gameplay is pretty limited in this game, isn't it?
The user can only press the space bar to move the sprite up.
In this add on, create a button that allows the sprite
to dive or move down faster than it falls.
First, you need to program a key
that will tell the bird to dive.
This example will use the down arrow,
and some way to check if the user is pressing that button.
If the user is not hitting the space bar,
he or she might be clicking the down arrow.
If the user isn't clicking either,
the bird should still move down, just more slowly.
This example will remove the switch costume to parrot-a
and change y by negative five blocks
from the else section of this if else statement,
keeping them to the side to use later.
Then, you will add an if else into the else,
where you just removed the code.
Then, add the key down arrow pressed block
to the inner if else statement.
If neither the down arrow nor the space bar is pressed,
the bird should still move down.
So add the switch costume and change y
by blocks that you previously removed to the else.
If the down arrow is pressed,
the bird should move down faster.
Tink with the values to change the speed the sprite falls.
This example uses change y by negative 10.
This now reads, if the space bar key was pressed,
change to parrot-b costume and move up five.
Otherwise, if the space bar key hasn't been pressed,
then check if the down arrow was pressed.
If it was, then switch the costume to parrot-a,
and change y by minus 10.
If the down arrow wasn't pressed, go down more slowly.
Okay, that seems right.
Test the code to see if it works.
Great. Now it's your turn.
Add another if else inside the first if else
that checks if the user has pressed the down arrow.
Then, make the bird move down faster
when the down arrow is pressed.