Ledge hanging Construct 2

0 favourites
  • 12 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I saw a post in CC forums about hanging on a ledge, but the thing is I can't seem to duplicate it in C2. I've taken out all the things I tried to duplicate and started a different method, which I can't go beyond because the player attaches only to one particular instance of the object it's colliding with, and not the ones it needs to.

    If there are any examples, I'd be glad to check them out. Otherwise, if you want to take a look at what I have thus far and see if you can help me out on this, it would be very appreciated. Thank you!

    Please see this tutorial

    Thanks again,

    Rory

  • Mod edit :

    Please see : This tutorial

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • roracle: there's another example of implementation in the how do I FAQ.

    I'll add this topic too to the list.

    Good example Yann.

  • Thanks for the help guys, I woke up at 5:30 AM and it's almost 9:30 PM now, and this is the only thing I've worked on all day. I finally got it down, but if someone has a method of making the camera more smooth, please let me in on it.

    Also, when this is run in scaled full screen, it doesn't always position the person properly. I think most of the trouble I had with this whole scenario was pulling my hair out over and over, then finding out the full screen was buggy as all get out. I admit this is a complicated feat I'm embarking upon, but hopefully C2 and HTML5 will be along well enough to produce good results with what I have currently.

    Please see this tutorial

  • There are camera examples in the how do I FAQ (section scrolling/camera).

    What do you mean by "it doesn't always position the person properly" ?

    The only "bug" I noticed was that when falling from a platform, the character did not went back to the "idle" animation.

    I'm pretty sure it has more to see with a little mistake in your complex code than anything to do with full screen, since it happens again even if I set the full screen to off.

    It looks like your character should be clutched to a platform but instead is falling. I can press the "up" key when touching the ground (while staying in "falling" animation) and I get a "push up" like when I'm clinging to the platform and want to go up.

  • The scrolling I can live without, basic scrolling techniques are fine for this game, I have a method I used in MMF for keeping it between the two objects, so I'll try that eventually.

    For now, however, it should be noted that I'm not quite sure as to why the animation won't change back to Idle after the falling. I've played around a bit, wiped out a bit of code that wasn't needed, things are still stable, but that one error...I might have to write out everything I have on paper.

  • Okay, I got it right this time, it's awesome, could use a bit of refining, but alas I've worked all day on it. I don't think I'll up another example after this. This ledge hanging experiment is part of a bigger project. I always had trouble with ledges, but I was able to do this in a day's time thanks to C2.

    In my final upload, I have an area where you can walk or run around and grab ledges. They're a bit tricky at times, but it's all doable.

    Let me know what you think!

    Hold X to run

    Hold SHIFT to grab onto a ledge (only when falling)

    Hit "Up" while grabbing a ledge to climb it.

    Please see this tutorial

  • I like it :)

    It's quite challenging having to run and jump in order to reach a platform, and remembering to hold on to the edge.

    Very good implementation. Well done!

    Now...where's the full game :)

  • Please see this tutorial

    Cleaner

  • Interesting, you know had I looked at that "Enable/Disable" operation earlier I probably would have had this done way quicker.

  • Yeah I ignoring control wasn't a bad idea but if you want to totally kill any movement caused by the behavior, deactivation is better.

    However you see that it's not always a good thing for the climbing thing for instance. You would have to be pixel precise for the sprite not to fall after climbing, thus I had to use the ignore instead of disable to let the PlayerDetect sprite falls during the climbing. So you won't have to play the stand animation after the climbing.

  • Hey! So I made a tutorial/analysis out of this example project, and I just wanted to share it in case other users stumble upon the need for their own ledge grab, climb, and hold! I'm considering going through a lot of Kyatric's examples and cleaning them up and attempting to explain the code inside.

    Ledge Grab and Hold - Community Example Analysis

    This way the *.capx files are also preserved on the Scirra website rather than any third party hosts!

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