Select the stage ...
... click on the "Backgrounds" tab then "import" ...
From the backgrounds choose "Nature" ...
... and then find the image called "underwater" Press "OK".
This is what you should see. You can delete the white background if you wish.1. Screenshot your project so far and describe changing the background of your project.
Click back on the cat (its a "sprite", a graphic that can be given instructions). Change the cat into a shark by clicking on "Costumes" and then "Import" ...
... then from the "animals" folder ...
... choose "shark 1-a"
Press "OK" and the cat will become a shark.
You can now delete the cat costumes that are not needed.
Now add another costume to the shark, "shark 1-b".
Your shark will have two costumes and when the script switches between them the shark will be opening and closing its mouth.2. Screenshot your project so far and describe changing the costume of a sprite.
Now we need to give the shark its script, the instructions that will make it do things.
By the way, there is a little button highlighted in the picture below. Click this to make the shark only face left and right; this will stop the shark from flipping onto its back. Quite a few people have missed this step out, please don't be one of them.
Click on "Control" to see the list of control options and then drag the "When green flag clicked" instruction into the script area.
Now make this script.
When the green flag is clicked a "forever loop" will start.
Inside the loop are a series of instructions.
- point towards the mouse pointer
- move 10 steps
These two lines make the shark move towards to position of the mouse pointer 10 steps at a time.
- next costume
- wait 0.1 secs
These two lines make the shark change between the mouth open and mouth closed costumes every tenth of a second..3. Screenshot your project so far and describe the script you have given the shark sprite.
Add a new sprite from the folders.
Choose one of the fish.
Right click on the fish and resize it to make it smaller.
Now add this script for the fish.
This is a repeat until loop that makes the fish move 4 steps at a time. If the fish touches the shark it is hidden.
Change the settings so that the fish can only move from side to side and no longer swims on its back.4. Screenshot your project so far and describe adding a new sprite.
From the variables scripts choose "Make a variable"
Give the variable the name "Eaten".
It needs to be valid for all sprites.
Now change the script for the fish so that every time it is eaten by the shark the number of fish eaten goes up by 1.
To make life more difficult for the player we need the fish to appear at a random spot and not in the same place every time. Use the "pick random" script. I have shown Y but you need to write X as well.
Notice that I have added the random value for x here.
Now make the fish reappear 2 seconds after it has been eaten by putting the completed script inside a forever loop (to make it repeat) and add a wait of 2 seconds at the end.
Right click on the sprite and select "duplicate" to make more fish. You may wish to make the different sizes.5. Screenshot your project so far and describe making a sprite appear at random.
To make the game more difficult add an octopus that will set the score to 0 if the shark eats it by mistake. The octopus has two costumes to import.
Here is the script for the octopus.
Now you can play the game.
You can make it more difficult by adding a different fish that travels vertically, scores 10 and can only appear once.
How might you get the game to decide when the player has won, say by eating 20 fish?
You can add another fish that makes a prey fish vanish so the shark has less to eat.
How might you set a time limit on the game?
Use project 2 to make the shark change colour as it moves about.6. Screenshot your project so far and describe including one of the changes listed above.
Don't forget to save your project as "Shark Attack" when it is complete.
To make the game more difficult, you could make the shark smaller over time, you could make the octopus re spawn and move more quickly each time. You could make the fish move at different speeds or change direction at random or disappear from time to time. You might even get the game to keep score as you eat more fish.7. Screenshot your finished project so far and describe including at least one of the extensions listed above.