Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Wall collision in a side-scroller.
- Lunarian
-
25 posts
Wall collision in a side-scroller.
Hello again, fellow Scratchers…
I'm working on a platformer game and I need help with the wall collision in it.
I just need the screen to stop scrolling when the purple box sprite hits a wall. If anyone could help me with this, that would be great! Thanks.
Link to game: http://scratch.mit.edu/projects/49938308/#editor
I'm working on a platformer game and I need help with the wall collision in it.
I just need the screen to stop scrolling when the purple box sprite hits a wall. If anyone could help me with this, that would be great! Thanks.
Link to game: http://scratch.mit.edu/projects/49938308/#editor
- deck26
-
1000+ posts
Wall collision in a side-scroller.
I suspect you'd find it easier if you were using different colours for different bits of the world or have different colours at the side and top/bottom of the moving block. Otherwise you want to be able to move horizontally if you're touching the background at the bottom of the sprite (you're on the ground) but not it you're touching it at the right side when trying to move right but have no way to differentiate.
You could use the ‘colour touching colour’ block perhaps or split the walls and floors into different sprites if you want ‘touching sprite’ to be how you interact with the world.
You could use the ‘colour touching colour’ block perhaps or split the walls and floors into different sprites if you want ‘touching sprite’ to be how you interact with the world.
- Bellydancer3259
-
1 post
Wall collision in a side-scroller.
I am having the same problem! when the sprite hits a wall it continues to scroll without the sprite…
- deck26
-
1000+ posts
Wall collision in a side-scroller.
Please create your own new topic rather than necroposting and share the project. I am having the same problem! when the sprite hits a wall it continues to scroll without the sprite…
- mrpickles34
-
1 post
Wall collision in a side-scroller.
I'm making a side scroll game but i don't know a way to make the wall collision right It will just keep going up do you know how to help with that
- Discussion Forums
- » Help with Scripts
-
» Wall collision in a side-scroller.