Discuss Scratch

  • Discussion Forums
  • » Help with Scripts
  • » Need help with my coding. Glitches regarding background switches and also having trouble with having sprite follow mouse closely. [RSS Feed]
TumblingDolphins
New Scratcher
2 posts

Need help with my coding. Glitches regarding background switches and also having trouble with having sprite follow mouse closely.

https://scratch.mit.edu/projects/1381487795

It's Pong part 1 copy.

I am trying to make it a little intractable and have two different outcomes, but after the “pong” part, the doors aren't working and the background is not switching. I am also a little worried about the toothbrush not following the mouse pointer closely, but I am more concerned about the door problems.

I am not sure if the code can be seen with the link I sent, so if not, please let me know.

Many thanks,

TumblingDolphins
RokCoder
Scratcher
1000+ posts

Need help with my coding. Glitches regarding background switches and also having trouble with having sprite follow mouse closely.

In your germ sprite, add a "stop this script“ with the ”hide" when the game is over. Without that, the game is constantly changing the background to the win or lose backdrop every frame.

The toothbrush isn't staying with the mouse pointer because the costume isn't centred correctly.
TumblingDolphins
New Scratcher
2 posts

Need help with my coding. Glitches regarding background switches and also having trouble with having sprite follow mouse closely.

Dear RokCoder,

Oh my goodness, everything works now!
I didn't even know centering costumes was a thing.

Thank you so much for your help!
  • Discussion Forums
  • » Help with Scripts
  • » Need help with my coding. Glitches regarding background switches and also having trouble with having sprite follow mouse closely. [RSS Feed]

Powered by DjangoBB