Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How can I detect walls?
- Krammy
- Scratcher
28 posts
How can I detect walls?
I have a platformer script, but when I jump into blocks above I glide through. Also, my sprite doesn't collide with walls. Can this be fixed?
- explodingstuff
- Scratcher
100+ posts
How can I detect walls?
I'm not sure about the “doesn't collide with walls” thing, but if you want your character not to glide through, try making it only work if it touches a color that looks like your platform, and put that color at the top of your platform.
You saw my username. I make things explode.
- Krammy
- Scratcher
28 posts
How can I detect walls?
I'm not sure about the “doesn't collide with walls” thing, but if you want your character not to glide through, try making it only work if it touches a color that looks like your platform, and put that color at the top of your platform.
Did the opposite of that and put a sprite underneath and set the ghost effect to 100. Now I just need to work out how to stop it from going through walls.
- DotDash
- Scratcher
1000+ posts
How can I detect walls?
Try using this http://wiki.scratch.mit.edu/wiki/Scrolling_Platformer_TutorialI'm not sure about the “doesn't collide with walls” thing, but if you want your character not to glide through, try making it only work if it touches a color that looks like your platform, and put that color at the top of your platform.
Did the opposite of that and put a sprite underneath and set the ghost effect to 100. Now I just need to work out how to stop it from going through walls.
My browser / operating system: MacOS Macintosh X 10.8.5, Chrome 29.0.1547.76, Flash 11.8 (release 800)
- Krammy
- Scratcher
28 posts
How can I detect walls?
Nevermind. Used unnoticable colours on each side of my sprite to make it work. Thanks for the help.
- Discussion Forums
- » Help with Scripts
- » How can I detect walls?