Discuss Scratch

pphillip12345
New Scratcher
3 posts

Sprite keeps getting stuck on bottom

Hi I am totally new to scratch so I copied the code from another creator and just changed the game visually. I am just trying to understand how all this works so I can make a game myself but I am having trouble.

I have double checked the code between the two games and everything seems to be the same.

However, my rock sprite keeps getting stuck on the bottom while playing when it's supposed to disappear at the bottom and reappear at the top like the game from the creator I copied from.

Any idea what I am doing wrong? Thanks if you could help a dumb newbie out

Original game: https://scratch.mit.edu/projects/724135190
My copy of the game: https://scratch.mit.edu/projects/728287086

Last edited by pphillip12345 (Sept. 5, 2022 09:30:26)

scratching_claws
Scratcher
71 posts

Sprite keeps getting stuck on bottom

The project probably detects a specific colour to work out when to hide.
pphillip12345
New Scratcher
3 posts

Sprite keeps getting stuck on bottom

I do not see anything relating to color in the code for the original game
theforgottenwisp
Scratcher
100+ posts

Sprite keeps getting stuck on bottom

In the “rock falling down” custom block, try changing
<(y position) < [-180]>
to
<(y position) < [-160]>
because the rock never goes below y=-180, so the script to go back to the top never runs.
pphillip12345
New Scratcher
3 posts

Sprite keeps getting stuck on bottom

Thank you so much, that fixed the bug!
theforgottenwisp
Scratcher
100+ posts

Sprite keeps getting stuck on bottom

pphillip12345 wrote:

Thank you so much, that fixed the bug!
No problem!

Powered by DjangoBB