Discuss Scratch

blackgold
Scratcher
4 posts

Falling 'fish food'

I'm making a game where fish food randomly falls and by moving your fish side to side, you have the food drop on the fish. The problem is, I can't make it randomize. What I'm trying to do is make one of my sprites broadcast a number between 1 and five, and then have 1 of the five locations of fish food drop a food. (Forever or until the player misses one.) Obviously, this isn't working. Please help!
drmcw
Scratcher
1000+ posts

Falling 'fish food'

You must start the fish food somewhere,, just randomise the x position. So use go to x:random -240 to 240 y: 180.
If you really need 5 broadcasts then create 5 broadcast messages such as;
drop 1, drop 2, drop 3, drop 4, drop 5
The you can use broadcast join drop random 1 to 5

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
googlebooglemoogle
New to Scratch
2 posts

Falling 'fish food'

Join my studios. SuperShrezzieStudios, please and add in your fave projs. That fish game will be exiting to see!

Powered by DjangoBB