Discuss Scratch

lioness_outlander
Scratcher
64 posts

Glitching out

So,I am making a project simaler to crossy road,and when it advances to the next level,all the cars stop and glitch out,and so does the backround.I do not know why this is happenning.Got any answers?

Edit:I fixed it though I have a new bug,my script is not working~
So,I want my sprite to touch the portal and switch to the next backdrop,but the backround is not changing.I have no idea how this is happenning

Last edited by lioness_outlander (June 22, 2017 20:19:56)

drmcw
Scratcher
1000+ posts

Glitching out

Questions like this should be in help with scripts.
Paddle2See
Scratch Team
1000+ posts

Glitching out

I'll move this over to the “Help With Scripts” section for you - that's a better fit for this kind of topic

Please share your project and post a link to it here so we can take a look.
lioness_outlander
Scratcher
64 posts

Glitching out

Here It is!
https://scratch.mit.edu/projects/166584219/
Just click the big NO to hide it cuz I don't want other scratchers to see it yet
lioness_outlander
Scratcher
64 posts

Glitching out

Ok!I knew one of my dumb questions would probably be mistakingly put in the wrong category,after all,I am fairly new to the forums
Uniquename1
Scratcher
100+ posts

Glitching out

A couple things… first problem is that in the chicken sprite you only check if touching portal one time when the green flag is clicked. This is a common mistake. You either need a forever loop so it always checks if touching portal or use a wait until touching portal. But again as i said the way it is now it checks when the game starts and then it never checks again.

You also have 2 switch backgrounds; a switch to background 2 and a next background when it receives the broadcast. Maybe just something because you were trying to fix it but having them both there sets you back to the 1st so you skip right over #2. Eventually you may have more levels so just use the next background one.

Some other problems you didn't ask and i didn't look too much into but your movement isn't the best. He doesn't go down, you need to switch the multiply by 1 to multiply by -1 so he can go backwards/ down unless you were trying to limit that. It also moves too quickly and when you start moving right he forever goes right. The chicken will also go all the way to the top when you press up. The whole movement system is too complicated for your game. right and up follow different rules than left and down because you start dealing with negative numbers and the way it is now it's not working. You could have something much simpler or figure out and fix the movement controls you have now.

Powered by DjangoBB