Climbing ladders in a sidescroller

micahmicah Member Posts: 85
edited November -1 in Working with GS (Mac)
I want to make it so when the player is over a ladder, they can press up to climb it, and when they're not pressing anything they don't fall. I'm having trouble making it work. Gravity is 300, so to cancel it out I need to accelerate up at a rate of 300. I can't get it to work.

I'm using a rule in the player actor that says if it collides or overlaps a ladder, to accelerate up. And if the player presses up, there's another rule that checks to see if it's overlapping a ladder or not, and if so it accelerates up even more instead of running the jump code. But this isn't working. Anyone else had this problem?

Comments

  • micahmicah Member Posts: 85
    I mostly figured it out. If the player is overlapping a ladder, I constrain the player's y coordinate to 0, unless up is being pressed. It mostly works now, in case other people have the same problem.
Sign In or Register to comment.