Help with platfomer edgeclimb

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello all, I am having difficulties enabling my 2D stick hero to perform an edge climb or hanging from the edge of a cliff. It sorta works but the sprite animation wont show at all when he is hanging from the edge. I used a reference to the .cap tutorial on the subject from this forum to help me out and I am still having troubles.

    If someone can help it will be much appreciated.

    Reference page

    scirra.com/forum/platformer-with-edgeclimbing-hanging_topic42778.html

    My .cap file

    dl.dropbox.com/u/38448449/testedgeC.cap

  • The problem you are having is caused by trying to set the animation instead of using the system I made for the platform/attack animations, there is a conflict.

    I have edited your cap to a working state and added some comments showing what I removed(the events are toggled off, you can delete them once you understand what has changed) and what I have added.

    dl.dropbox.com/u/1487524/Scirra/EdgeClimbEdit.cap

  • Thank you very much, There is one problem I am having with this. When you try the edge climb from the other side (left side) of the platform the player gets swallowed in into the platform. How can that be fixed?

  • Ok, two problems.

    First is you are checking the angle of the maskplayer in events 2 and 3. It doesn't have angles.

    Solutions - You could check the angle of the sprite 'Sprite', or you could check the maskplayer private variable 'dir', I would recomend the latter.

    Second is you are subtracting the detector width in event 4 when you need to be adding it. maskplayer:set x to edge.x "+" edge.width

  • Okay got it thank you!

    One more thing, during the edgeclimb when I press the left or right keys the player changes direction. how about do you get it to lock directions? during the edgeclimb state. I've tried to play around with the functions such as "set angle towards object" or "set angle" but the direction will not lock.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Put the key presses that control the left and right movements under a 'is not edge climbing' sort of event.

  • Thank you so much! It works!!

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