Ledge hanging Construct 2

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply Page  12>
Author
1,997 Rep
Post Options Post Options   Quote roracle Quote  Post ReplyReply Direct Link To This Post Topic: Ledge hanging Construct 2
    Posted: 08 Dec 2011 at 2:32pm
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!

(Download: clik here.)

Thanks again,
Rory
Back to Top
11,785 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 08 Dec 2011 at 5:25pm
Back to Top

Moderator
28,550 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 08 Dec 2011 at 5:40pm
@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.
Back to Top
1,997 Rep
Post Options Post Options   Quote roracle Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 3:26am
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.

Click here to download the latest revision of this engine.
Back to Top

Moderator
28,550 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 4:23am
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.
Back to Top
1,997 Rep
Post Options Post Options   Quote roracle Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 5:02am
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.
Back to Top
1,997 Rep
Post Options Post Options   Quote roracle Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 6:28am
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.

Click to download!
Back to Top
6,826 Rep
Post Options Post Options   Quote zenox98 Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 8:44am
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 :)
Spec:
OS: Windows 7 SP1 64bit, Intel I7-2600 3.4 GHz, Memory: 8 GB, Gfx: GeForce 560TI DirectCUII.
Back to Top
11,785 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 10:04am
Back to Top
1,997 Rep
Post Options Post Options   Quote roracle Quote  Post ReplyReply Direct Link To This Post Posted: 09 Dec 2011 at 3:05pm
Interesting, you know had I looked at that "Enable/Disable" operation earlier I probably would have had this done way quicker.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down