I’m trying to make a platformer, people should go to the right.
However, when somebody decides to go left, they fall off the level.
So I want to put an invisible wall there (may be visible while developing, has to be invisible when making the game public).
So, I added a platform that is placed as a wall, and now people can’t jump off as easily, great!
except that people can now climb it.
So I’ve been looking all over for a solution to this problem. And although you guys came up with a solution it still doesn’t work atleast for me. The player can climb any platform on each side and it’s irritating
Hello,
I actually encountered the same problem as you and their solutions didn’t work for me as well. What I did instead is that I set a variable where the character’s jump speed is 0 (Which means he won’t be able to jump) whenever he encounters a wall. This is what the code looked like.
Keep in note that this also works whenever he encounters a certain wall, you will just need to make a new object for it and make it invisible.
Do you have the platform object set as a “ladder”? That’s the only time I’ve been able to climb any platform. The jumping in my game isn’t very high either unless you used a certain potion or crystal; only then have I been able to jump over a wall unless the wall is made higher than I can jump whether the speed is normal or “boosted”.
You can make invisible walls with platforms by setting the opacity on the tiled sprite to 0 as well.