Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » chasey game
- Nutmeg2017
-
4 posts
chasey game
I am making a chasey game, my idea was to have a time limit that the shark has to try to tag the starfish with out going over the time limit of 30 secs.
If the shark doesn't get the star fish 10 times before the timer runs out the star fish wins, but if the the shark tags the starfish 10 times before 30 secs shark wins.
How do I code that?
Please help!!!
My game is Sharks Breakfast
If the shark doesn't get the star fish 10 times before the timer runs out the star fish wins, but if the the shark tags the starfish 10 times before 30 secs shark wins.
How do I code that?
Please help!!!

My game is Sharks Breakfast
- hair444y
-
46 posts
chasey game
I'd recommend including a link instead of the name of the project. It makes the project more accessible.
Well if you already have the chasing scripts then here is what I suggest:
I'd start by having a script in the stage which acts as a timer:
In the shark use the scripts:
In the star fish use these scripts:

Well if you already have the chasing scripts then here is what I suggest:
I'd start by having a script in the stage which acts as a timer:
In the shark use the scripts:
In the star fish use these scripts:
I hope this works

Last edited by hair444y (July 31, 2017 11:13:53)
- Nutmeg2017
-
4 posts
chasey game
Hi, this script is not working and it is the whole point of my game.
- hair444y
-
46 posts
chasey game
The problem is that the script is only running once as soon as Start is broadcasted. Hi, this script is not working and it is the whole point of my game.
Fix this by putting this in a loop:
- TheArcadeGuy
-
100+ posts
chasey game
Hi there, you may also want to add a wait until block to prevent the counter from going up if the shark is still touching the fish. Otherwise, the tally would go up instantly.
- Discussion Forums
- » Help with Scripts
-
» chasey game