Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I give a sprite collision?
- helloImMcBoberson
-
Scratcher
8 posts
How do I give a sprite collision?
I'm making a game where you are looking down at a playable sprite in a maze with a monster I need to give the walls in the maze collision.

- Arvionyx
-
New Scratcher
34 posts
How do I give a sprite collision?
You can simply use sensing blocks (e.g if touching wall) and when it is true you can set a variable to true to telll the player sprite it is colliding with something. To tell which direction the wall is, you can have the player sprite make a clone of it self that will always be 5 steps in front of the player in the direction they are moving towards (depending on player sprite size and distance from sprite middle) and if it is touching the wall is will let the player sprite know that there is a wall in that direction and prevents it from moving that way. (Not the best explanation but it should work)
- The_Cool_Test_Alt
-
Scratcher
100+ posts
How do I give a sprite collision?
You can use this for inspiration.
- Discussion Forums
- » Help with Scripts
-
» How do I give a sprite collision?