Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Wall Jumping
- GJtheLegend
-
Scratcher
20 posts
Wall Jumping
I am making a platformer and I want wall jumping to be in it, but I don't know how to make it! any tips?

- Alberknyis
-
Scratcher
1000+ posts
Wall Jumping
If you know how to make a regular platformer, then wall jumping is an extension that comes in two parts: Detecting a wall and activating a walljump.
Detecting a wall:

When you move horizontally, touching the level means touching a wall (unless there's slopes, then it's a bit more advanced). If you're touching a wall, you can walljump. So inside your wall detecting script add a check to see if the player is jumping, and which direction the walljump should go.
Activating a walljump:

This part is far easier and requires no explanation.
You may notice that this method only works if you're pushing into the wall. If you're not, it won't jump. You can separate the walljump detection into its own script where it moves left and right one pixel to check if its next to a wall.
Detecting a wall:

When you move horizontally, touching the level means touching a wall (unless there's slopes, then it's a bit more advanced). If you're touching a wall, you can walljump. So inside your wall detecting script add a check to see if the player is jumping, and which direction the walljump should go.
Activating a walljump:

This part is far easier and requires no explanation.
You may notice that this method only works if you're pushing into the wall. If you're not, it won't jump. You can separate the walljump detection into its own script where it moves left and right one pixel to check if its next to a wall.
- GJtheLegend
-
Scratcher
20 posts
Wall Jumping
If you know how to make a regular platformer, then wall jumping is an extension that comes in two parts: Detecting a wall and activating a walljump.But what do I put under Define uncollide?
Detecting a wall:
When you move horizontally, touching the level means touching a wall (unless there's slopes, then it's a bit more advanced). If you're touching a wall, you can walljump. So inside your wall detecting script add a check to see if the player is jumping, and which direction the walljump should go.
Activating a walljump:
This part is far easier and requires no explanation.
You may notice that this method only works if you're pushing into the wall. If you're not, it won't jump. You can separate the walljump detection into its own script where it moves left and right one pixel to check if its next to a wall.
- GJtheLegend
-
Scratcher
20 posts
Wall Jumping
If you know how to make a regular platformer, then wall jumping is an extension that comes in two parts: Detecting a wall and activating a walljump.There are a few problems with this
Detecting a wall:
When you move horizontally, touching the level means touching a wall (unless there's slopes, then it's a bit more advanced). If you're touching a wall, you can walljump. So inside your wall detecting script add a check to see if the player is jumping, and which direction the walljump should go.
Activating a walljump:
This part is far easier and requires no explanation.
You may notice that this method only works if you're pushing into the wall. If you're not, it won't jump. You can separate the walljump detection into its own script where it moves left and right one pixel to check if its next to a wall.
- What triggers this?
what do I put under Define uncollide?
Last edited by GJtheLegend (July 21, 2022 19:45:13)
- Discussion Forums
- » Help with Scripts
-
» Wall Jumping

