Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I make wall collision work in my platformer game?
        ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
- YoshiGPLS
- 
                             Scratcher Scratcher
2 posts
How do I make wall collision work in my platformer game?
I've figured out how to make a death controller, and a jump & gravity controller, but wall collision I have no idea how to make. The color for the ground is #00ff00. Any help is appreciated!
                        
                        
                    - FFOOOODD12345
- 
                             Scratcher Scratcher
25 posts
How do I make wall collision work in my platformer game?
if you have an “X speed” variable you can do…
                        
                        
                    define a new block (Run without screen refresh)
change y by (3) (to move off the ground)
if <touching [ground sprite]?> then
change x by (X speed)
end
- FFOOOODD12345
- 
                             Scratcher Scratcher
25 posts
How do I make wall collision work in my platformer game?
oops, what I meant was 
and also, you can put
                        
                        
                    change y by (3)to move off the ground
and also, you can put
when green flag clicked
forever
a new block
end
- Discussion Forums
- » Help with Scripts
- 
            » How do I make wall collision work in my platformer game? ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
 
            ![[RSS Feed] [RSS Feed]](http://cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)

