try this script; (When /= clicked)(show){forever(if<not<touching(Big Fish)?>>(turn (\ (pick random(-45)to(45)degrees)(glide(0.5) secs to x:(pick random(-100) to (100)) y: (pick random(-100) to (100))){else (play sound (meow))(change(score)by(1))(hide)}} for both fish
I think i know why it isn't working. You have a if else block for when the green flag is clicked, but it will only check at the very beginning of the game(when flag clicked) Try putting the if else statement in a forever block.
Download this project!
Download the 3 sprites and 3 scripts of "Chomp 1" and open it in Scratch
Project Notes
Hello! When the "Little Fishes" sense the "Big Fish" then the score should go up by 1, the little fish should say "Meow" and the Little Fish should disappear.
For some reason, the little fish do not seem to sense the big fish, and so they never get "eaten".
Can someone please take a look at the code and let me know why this may not be working as I designed it to?
Comments
You need to be logged in to post comments
Add a Comment
try this script; (When /= clicked)(show){forever(if<not<touching(Big Fish)?>>(turn (\ (pick random(-45)to(45)degrees)(glide(0.5) secs to x:(pick random(-100) to (100)) y: (pick random(-100) to (100))){else (play sound (meow))(change(score)by(1))(hide)}} for both fish
i rewrote it and it worked and i also made a way for the fishes to win (link to project)
That's weird. I've tried everything to fix your game, misterlawrence and it just doesn't work. I would try to rewrite it carefully.
Wait never mind, tried what i said earlier and didn't work
I think i know why it isn't working. You have a if else block for when the green flag is clicked, but it will only check at the very beginning of the game(when flag clicked) Try putting the if else statement in a forever block.