Discuss Scratch

amy482004
Scratcher
79 posts

Catching Fish Program

Hi. My Catching Fish Program is a mini-game inside a project.

What it's supposed to do: You have to organize the fish into groups. The fish appear one at a time. You click the buttons at the bottom and when you hear the the button saying the corresponding thing with the fish, you drag the fish to the button. When you drag the fish to the correct button, the level moves on.
The scripts I'm using:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseforevershowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103

whenIreceiveTouch StripesiftouchingStripe Button?thensayYes!for2secsbroadcastStripes CompletehideelsebroadcastStart Fish Game

What happens: The game won't let me put the fish to the right button! Even when I drag it to the right button, it doesn't do what it's supposed to, it just keeps swimming.

So I hope you can help me. I haven't shared the project yet, and kinda don't want to yet, but I made the mini-game in another project so you can see it and hopefully help me. The project is here.

Last edited by amy482004 (Aug. 30, 2016 13:26:05)

asivi
Scratcher
1000+ posts

Catching Fish Program

amy482004 wrote:

Hi. My Catching Fish Program is a mini-game inside a project.

What it's supposed to do: You have to organize the fish into groups. The fish appear one at a time. You click the buttons at the bottom and when you hear the the button saying the corresponding thing with the fish, you drag the fish to the button. When you drag the fish to the correct button, the level moves on.
The scripts I'm using:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseforevershowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103

whenIreceiveTouch StripesiftouchingStripe Button?thensayYes!for2secsbroadcastStripes CompletehideelsebroadcastStart Fish Game

What happens: The game won't let me put the fish to the right button! Even when I drag it to the right button, it doesn't do what it's supposed to, it just keeps swimming.

So I hope you can help me. I haven't shared the project yet, and kinda don't want to yet, but I made the mini-game in another project so you can see it and hopefully help me. The project is here.
I'm not sure but try this:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseshowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103broadcastTouch Stripes
amy482004
Scratcher
79 posts

Catching Fish Program

asivi wrote:

amy482004 wrote:

Hi. My Catching Fish Program is a mini-game inside a project.

What it's supposed to do: You have to organize the fish into groups. The fish appear one at a time. You click the buttons at the bottom and when you hear the the button saying the corresponding thing with the fish, you drag the fish to the button. When you drag the fish to the correct button, the level moves on.
The scripts I'm using:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseforevershowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103

whenIreceiveTouch StripesiftouchingStripe Button?thensayYes!for2secsbroadcastStripes CompletehideelsebroadcastStart Fish Game

What happens: The game won't let me put the fish to the right button! Even when I drag it to the right button, it doesn't do what it's supposed to, it just keeps swimming.

So I hope you can help me. I haven't shared the project yet, and kinda don't want to yet, but I made the mini-game in another project so you can see it and hopefully help me. The project is here.
I'm not sure but try this:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseshowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103broadcastTouch Stripes
I'm sorry, it didn't work. You can experiment on the project I made here which was specifically made to help you figure it out…
asivi
Scratcher
1000+ posts

Catching Fish Program

amy482004 wrote:

asivi wrote:

amy482004 wrote:

Hi. My Catching Fish Program is a mini-game inside a project.

What it's supposed to do: You have to organize the fish into groups. The fish appear one at a time. You click the buttons at the bottom and when you hear the the button saying the corresponding thing with the fish, you drag the fish to the button. When you drag the fish to the correct button, the level moves on.
The scripts I'm using:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseforevershowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103

whenIreceiveTouch StripesiftouchingStripe Button?thensayYes!for2secsbroadcastStripes CompletehideelsebroadcastStart Fish Game

What happens: The game won't let me put the fish to the right button! Even when I drag it to the right button, it doesn't do what it's supposed to, it just keeps swimming.

So I hope you can help me. I haven't shared the project yet, and kinda don't want to yet, but I made the mini-game in another project so you can see it and hopefully help me. The project is here.
I'm not sure but try this:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseshowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103broadcastTouch Stripes
I'm sorry, it didn't work. You can experiment on the project I made here which was specifically made to help you figure it out…
Don't use glide blocks, use poit in direction and move ( ) steps instead.
deck26
Scratcher
1000+ posts

Catching Fish Program

Also make sure you're testing from the project page, not the editor.
amy482004
Scratcher
79 posts

Catching Fish Program

It still doesn't seem to be working.
deck26
Scratcher
1000+ posts

Catching Fish Program

It's really best to avoid using glide in projects like this - remember the sprite isn't checking for the mouse touching it when it is gliding so you have to be touching the mouse at the right time for the code to be skipped. Several of us here would also advise against using ‘draggability’ - code the sprite to allow the dragging instead.

It's not clear if you want the fish to be draggable at any time or only when stopped in middle.

I'm afraid I haven't time right now to do more for you.
deck26
Scratcher
1000+ posts

Catching Fish Program

https://scratch.mit.edu/projects/119551108/ is a quick remix. Stripey fish only changed, only draggable when paused in the centre of the screen.
FuturisticCougar
Scratcher
35 posts

Catching Fish Program

amy482004 wrote:

Hi. My Catching Fish Program is a mini-game inside a project.

What it's supposed to do: You have to organize the fish into groups. The fish appear one at a time. You click the buttons at the bottom and when you hear the the button saying the corresponding thing with the fish, you drag the fish to the button. When you drag the fish to the correct button, the level moves on.
The scripts I'm using:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseforevershowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103

whenIreceiveTouch StripesiftouchingStripe Button?thensayYes!for2secsbroadcastStripes CompletehideelsebroadcastStart Fish Game

What happens: The game won't let me put the fish to the right button! Even when I drag it to the right button, it doesn't do what it's supposed to, it just keeps swimming.

So I hope you can help me. I haven't shared the project yet, and kinda don't want to yet, but I made the mini-game in another project so you can see it and hopefully help me. The project is here.


This opens up so much to me. Thanks!
amy482004
Scratcher
79 posts

Catching Fish Program

FuturisticCougar wrote:

amy482004 wrote:

Hi. My Catching Fish Program is a mini-game inside a project.

What it's supposed to do: You have to organize the fish into groups. The fish appear one at a time. You click the buttons at the bottom and when you hear the the button saying the corresponding thing with the fish, you drag the fish to the button. When you drag the fish to the correct button, the level moves on.
The scripts I'm using:

whenIreceiveStart Fish Gameiftouchingmouse-pointer?thenbroadcastTouch Stripesstopthis scriptelseforevershowglide1.5secstox:82y:-80glide1.5secstox:302y:131hidegotox:-22y:103

whenIreceiveTouch StripesiftouchingStripe Button?thensayYes!for2secsbroadcastStripes CompletehideelsebroadcastStart Fish Game

What happens: The game won't let me put the fish to the right button! Even when I drag it to the right button, it doesn't do what it's supposed to, it just keeps swimming.

So I hope you can help me. I haven't shared the project yet, and kinda don't want to yet, but I made the mini-game in another project so you can see it and hopefully help me. The project is here.


This opens up so much to me. Thanks!
Your welcome…
amy482004
Scratcher
79 posts

Catching Fish Program

@deck26, thanks for the help. I tried your program, but it didn't work. I have found another solution. Thanks anyways!

Powered by DjangoBB