Discuss Scratch

dvd4
Scratcher
100+ posts

glitch in scratch

Are you saying there is a problem with scratch or with your project ?

'cause i'm not sure
hrsidkpi
Scratcher
16 posts

glitch in scratch

i did not see any problem in my project so i think the problem is in scratch.
drmcw
Scratcher
1000+ posts

glitch in scratch

hrsidkpi wrote:

i did not see any problem in my project so i think the problem is in scratch.
Then this should be in bugs and glitches. Having said that I can't see any glitches in your project unless you mean that blue blob in the maze?
DadOfMrLog
Scratcher
1000+ posts

glitch in scratch

There is a problem with your stage scripts, though it's a rather subtle one, and not obvious at all from what you see on the screen…

If you look in the two stage scripts you'll see that while the maze game is running, each of them is switching constantly to a backdrop. One is switching to backdrop 2, the other to backdrop 5. This means it is flipping between backdrops all the time (30 times per second, probably, since that is the standard Scratch loop timing).

Presumably, the touching checks are happening just at the time when it has put backdrop 2 on the screen, so there's no black for your yellow ball to touch. However, the other script then switches to backdrop 5 (the maze) before the screen refreshes, so that's the only one you actually on the screen.

To fix it, put “if game=0” check around the other “if…then…else” in the “when GF clicked” script of the stage, so that script is not doing any backdrop switching during the game.

Better still, don't have it setting the backdrop all the time within a forever loop. Instead, have it only switch to the appropriate backdrop when it actually needs to change.

Hope that helps!

Powered by DjangoBB