Discuss Scratch

lilbubbro
Scratcher
9 posts

Cat and Mouse

Hello, I am trying to make a game of cat and mouse. I'm trying to make it so that the cat will chase the mouse around the edge of a circle, but the cat won't follow the mouse. It keeps on getting stuck in the top left corner of the circle. Any ideas?
deck26
Scratcher
1000+ posts

Cat and Mouse

Sharing what you have will make it easier to give help that is relevant.
lilbubbro
Scratcher
9 posts

Cat and Mouse

https://scratch.mit.edu/projects/356399669/
sorry, that was kind of stupid of me
deck26
Scratcher
1000+ posts

Cat and Mouse

Are you referring to one of your sprites as the mouse or the computer mouse?

Sprite 2 moves towards the mouse pointer so I see no problem there, But is sprite 2 your mouse and sprite 3 the cat?

Sprite 4 seems to be trying to set ‘mouse sense’ to show where sprite 2 is relative to the centre but why have the calculation when it is negative? This is calculating 180 + 2 * direction which is, I suspect, not what you want. But why try to correct direction - Scratch will cope quite happily with the values it uses.

I'm guessing the problem you're trying to cope with is whether to turn sprite 3 clockwise or anti clockwise, https://scratch.mit.edu/projects/55006278/ may help.
lilbubbro
Scratcher
9 posts

Cat and Mouse

Thank you!

Powered by DjangoBB