[Solved] Reliable ledge-grab

  • Trying to figure out the best way method for ledge-grabbing. Currently I'm using a 2x2 detector and when it overlaps a solid, yet isn't overlapping a solid at 0,-2, the player grabs the ledge. Problem is it doesn't work well when falling at high speeds and sometimes activates when falling along a wall. I understand why..just not sure how to fix it :L

    I've looked at some examples around the forums but they seem to have the same issues.. Any ideas?

  • You could have a condition stating if the player was overlapping a solid on an offset, to turn off it's platform behavior.

    I'll try to upload a cap later today when I can. Managed to do it without using any extra sprites other than the player and collision.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Got it working by removing some unnecessary conditions ^^;

  • Rockwell, I'd still be interested in seeing what you were working on. I've been experimenting with several different ledge grab methods. Haven't yet found one I really like.

  • Awww damnit! I spent the last 3 hours coding up a Flashback clone just for you! ;p

    Glad you got it sorted though. So the detector falling with the player at high speeds was ok?

  • Edge Grabbing Example

    Can definitely be tweaked but it's a general idea. Increasing the collision offset gives more leeway to grab on. You can also walk off an edge and grab back on if you quickly reverse your direction in the air. Should be able to grab on while both jumping and falling.

  • procrastinator Well the player grabs the ledge every time now but it's not perfect.. your .capx might still be useful!

    Rockwell Will check out the example soon, I have to update C2 first.

  • Thanks to everyone who provided feedback here. Working through different methods of doing things is just going to help people make better games.

    /respect

  • Tokinsom, ah I was just pissing about with the Flashback clone ;p Good to know it works. Working imperfectly is better than not working at all! I might have a bash over the weekend to check fast moving objects as I've never had the need to check those. Working on a game now that may require it though so who knows.. ;)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)