Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Walking is acting weird
- RetroGameEmulator
-
Scratcher
11 posts
Walking is acting weird
In a scratch project, I am working on, when I walk onto an invisible sprite that should change the backdrop, it doesn't. Is there a way to fix this?
I will list the game and where the code is below:
Game here: https://scratch.mit.edu/projects/890058916/
Code is in player sprite, and you should probably hit play to see what i mean. Then can you please tell me how to fix it? Thank you!
I will list the game and where the code is below:
Game here: https://scratch.mit.edu/projects/890058916/
Code is in player sprite, and you should probably hit play to see what i mean. Then can you please tell me how to fix it? Thank you!
- griefercube
-
Scratcher
500+ posts
Walking is acting weird
because moveup also triggers movedown as when player moves it touches movedown.
You’ll have to do a conditional (if, then) to prevent that from happening
You’ll have to do a conditional (if, then) to prevent that from happening
- RetroGameEmulator
-
Scratcher
11 posts
Walking is acting weird
How does one do a conditional if, then? (Sorry im kinda new to coding so I suck at understanding these terms)
- RetroGameEmulator
-
Scratcher
11 posts
Walking is acting weird
I just figured out what you meant but I already have if, then blocks for it and its happening. Can you show what you mean? Thank you!
- griefercube
-
Scratcher
500+ posts
Walking is acting weird
I just figured out what you meant but I already have if, then blocks for it and its happening. Can you show what you mean? Thank you!
Sure

- RetroGameEmulator
-
Scratcher
11 posts
Walking is acting weird
I just did that and it still is doing the thing, do you know anything else I could do?
- griefercube
-
Scratcher
500+ posts
Walking is acting weird
Oh yeah, you gotta put
set [touching? v] to (1)after the switch costume for all 4 directions also
- RetroGameEmulator
-
Scratcher
11 posts
Walking is acting weird
It still doesn't work. Can you check and see if I did anything wrong?
Game link here https://scratch.mit.edu/projects/890058916/
Game link here https://scratch.mit.edu/projects/890058916/
- RetroGameEmulator
-
Scratcher
11 posts
Walking is acting weird
NVM i'm restarting coding the game to see if i can fix it
- griefercube
-
Scratcher
500+ posts
Walking is acting weird
if <(x position) > (240)> then
set x to (-239)
switch costume to [… v]
end
Check that it doesn’t overlap (when the player moves they shouldn’t tough both triggers, so this script reduces touching
- Discussion Forums
- » Help with Scripts
-
» Walking is acting weird

