Discuss Scratch

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?

explodingstuff wrote:

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?

Krammy wrote:

explodingstuff wrote:

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.
Try using this http://wiki.scratch.mit.edu/wiki/Scrolling_Platformer_Tutorial

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.

Powered by DjangoBB