Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » To make a sprite stop moving when touching a color
- DOGSTREET1
-
Scratcher
3 posts
To make a sprite stop moving when touching a color
You can make a sprite start moving when it's touching something but how do you make it STOP moving when it touches something? I'm not that good at scratch and I rarely use operators, so HELP! All those good games have operators and variables in them, is it possible to make a game without all that good stuff????? Anyways, to the point. HOW DO YOU STOP A SPRITE FROM MOVING!
This is what i've done so far(it's shared):
https://scratch.mit.edu/projects/77149832/
Hope you guys can help meh!
This is what i've done so far(it's shared):
https://scratch.mit.edu/projects/77149832/
Hope you guys can help meh!
- BKFighter
-
Scratcher
1000+ posts
To make a sprite stop moving when touching a color
Go into the costume picture editor, and center all the second costumes, second, try using code like this:
when [right v] key pressedJust do the same for the different directions.
change x by (10)
if <touching color [#ff0088] ?> then//use color of maze wall
change x by (-10)
end
- Quadix
-
Scratcher
5 posts
To make a sprite stop moving when touching a color
when green flag clicked
forever
if <touching color [#ff0088] ?> then
stop [other scripts in sprite v]
end
end
- DOGSTREET1
-
Scratcher
3 posts
To make a sprite stop moving when touching a color
Thanks guys, but sadly, none of this works!!!!!



- BKFighter
-
Scratcher
1000+ posts
To make a sprite stop moving when touching a color
Still haven't done what I said, and I know my code works.
Go into the costume picture editor, and center all the second costumes, second, try using code like this:when [right v] key pressedJust do the same for the different directions.
change x by (10)
if <touching color [#ff0088] ?> then//use color of maze wall
change x by (-10)
end
- DOGSTREET1
-
Scratcher
3 posts
To make a sprite stop moving when touching a color
First of all, HOW do you center sprites???? Second of all, your “touching color _ ?” is a circle, not a hexagon. It's a hexagon for me. Does that make a difference?
- happypizza
-
Scratcher
27 posts
To make a sprite stop moving when touching a color
First, center sprites in the costume editor. The button's in the top right corner. Second, the reason booleans (hexagons) look like reporters (ovals) in scratchblocks is a limitation. It doesn't matter, because it's the same block.
- Samrohanauren
-
New Scratcher
1 post
To make a sprite stop moving when touching a color
It doesn't work!!
- FudgeEX
-
New Scratcher
1 post
To make a sprite stop moving when touching a color
I did an IF or ELSE statement. in the IF put you colour. in the THEN put the revers of the movement pace (so it can check if the colour is in its way then it will move revers) . in the ELSE put in your normal movement pace.
I will try to show you it if my screenshots will work
I will try to show you it if my screenshots will work

- duckboycool
-
Scratcher
1000+ posts
To make a sprite stop moving when touching a color
1. You can't use images since they need to be uploaded to a site like CubeUpload. They won't work if they are from your computer.
2. Please check the date of the topic before posting. This topic is likely dead.
2. Please check the date of the topic before posting. This topic is likely dead.
- Discussion Forums
- » Help with Scripts
-
» To make a sprite stop moving when touching a color