Hello,
I want to be able to make some games where a sprite has to collect a number of objects while avoiding being caught.
I am fairly new to scratch so it will need to be quite simple.
For example, in a game where a fish has to eat 10 pieces of seaweed while avoiding being eaten by the shark, I can make the fish follow the mouse. I can make the shark follow the fish and send it back to a starting point if it catches it. I can make the seaweed wobble around in the water.
Here's what I want to be able to do:
Make the seaweed disappear when the fish passes over it.
Make a "well done" message appear when all seaweed has been eaten.
Make the fish lose a life if the shark gets him.
Make a "game over" appear if the fish loses all his lives.
Any help you can offer a novice would be much appreciated.
Many thanks
Richard
Offline
The seaweed needs this script:
When [green-flag] pressed
Forever{
If <touching fish>{
hide
}
}
I may post some more later and welcome to scratch I hope you enjoy it
EDIT: also, if you can, please could you upload your project it makes it much easier to suggest scripts
Last edited by TRocket (2012-01-04 15:58:44)
Offline
hide seeweed:
[When Flag Clicked] [Wait until <touching fish>] [hide] [change [# of seaweed] by (-1)]
"well done" script goes in "well done" sprite (the one with the "well done" costume that will appear):
[When Flag Clicked] [hide] [set [# of seaweed] to (number of seaweed you want)] [Wait until <# of seaweed == 0>] [show]
Alternatively, instead of show/hide, you could just put this in the background and tell it to change to a "well done" costume.
Offline
To make the fish follow the mouse, you can follow this tutorial. I recommend using the Following the Mouse Indefinitely scripts, as this seems what you want.
Offline
Make the fish lose a life if the shark gets him.
[forever if <touching [shark]>] [{] [change [lives] by (-1)] [go to x:(0) y:(0)] // wherever you want the fish to re [}]
Make a "game over" appear if the fish loses all his lives.
[When Green Flag pressed] [set [lives] to (total number of lives)] [wait until <lives == 0>] [switch to costume [Game Over]] // or [broadcast [Game Over]]
Offline