This article will explain how to make your character in a platform game be able to grab and hold onto ledges. First of all, MAKE SURE YOU HAVE A CUSTOM PLATFORM ENGINE!!!! Do not use the the built-in one.

Ok, this will be slightly complicated, so bear with me.

First, make 3 active objects that are 3 by 3 pixel black tiles. Name them 'Left Tester' 'Right Tester' and 'Positioning Tester'.

There will be a 'Left Tester' on the right edge of every platform you have, and a 'Right Tester' on the left edge. (You'll see later why the directions are reversed.) The 'Positioning Tester' you can leave just outside the play area. (Remember once you're done, you'll want to make these all invisible.)

For your main character, you'll need to make a "Grab 1" animation, which is the animation of your character hanging on a platform, and a "Grab 2" animation which is an animation of your character pulling them self up onto the platform (the left direction will be for hanging on the right edge of a platform and the right direction for hanging on the left edge).

The last tester you need to make will be a long black bar at arm level of your character that spans across them entirely. Call it 'Player Tester'.

Now, make a group called 'Wall Hanging' (or something to that gist, activated at the start of the frame) and create the following events:

Repeat while left arrow is pressed
+ [Negate] Group 'Hang Left' is activated
+ 'Player Tester' is overlapping 'Left Tester'
-Activate Group 'Hang Left'
-Deactivate Group 'Wall Hanging'
-Set Value A of 'Player Tester' to 0
-Set Pos. of 'Position Tester' to (0,0) from 'Left Tester'
-Set Animation of 'Player' to 'Grab 1'

Repeat while right arrow is pressed
+ [Negate] Group 'Hang Right' is activated
+ 'Player Tester' is overlapping 'Right Tester'
-Activate Group 'Hang Right'
-Deactivate Group 'Wall Hanging'
-Set Value A of 'Player Tester' to 0
-Set Pos. of 'Position Tester' to (0,0) from 'Right Tester'
-Set Animation of 'Player' to 'Grab 1'

A lot of this probably doesn't make sense, so I'll briefly explain:
The key pressing is obvious, along with the collision. The [Negate] Group 'Hang Right (or Left)' is activated is just for bugshooting. But wait, you don't have a Group 'Hang Right (or Left)'. Don't create them just yet. The value setting is to make it so you can hang on a platform OR climb on top..you'll see later on. But now, you need to make an Always event (outside of any group) that says:
Always add 1 to Value A of 'Player Tester'
Moving the "Position Tester' on top of one of the edge testers is so you can be positioned from any tester, not just the one most recently created. (That may not make sense, but trust me, it’s necessary.)

Here we go..: I'm going to write all the events for Hang Left, I'm sure you can figure them out for the other direction

Group Hang Left (deactivated at start of frame):

Repeat while left arrow is pressed
+ Value A of 'Player Tester' is greater than 9
-Set Value A of 'Player Tester' to 0
-Activate Group 'Hang Left 2'
-Deactivate Group 'Hang Left'

[Negate] 'Player' animation 'Grab 2' is playing
-Set Position of 'Player' to 0,0 from 'Position Tester'
-Change Animation Direction of 'Player' to left
-Change Animation of 'Player' to 'Grab 1'

Upon pressing 'Right Arrow'
-Deactivate Group 'Hang Left'
-Activate Group 'Wall Hanging'

These events make pretty good sense; I think you can figure out what they do. (The pressing right is for falling off the platform if you do not want to pull yourself up.)
NOTE: Depending on the hot spots of your player, you may have to adjust the coordinates for 'Set Pos. of 'Player' to 0,0 from 'Position Tester' a bit (and also coordinates you will find in the following events.

Now you need the events to pull yourself up, so make another group.

Group Hang Left 2 (deactivated at start of frame):

'Player' animation 'Grab 2' is playing
-Set Position of 'Player' to 0,0 from 'Position Tester'

Value A of 'Player Tester' is greater than 1 and less than 5
-Change Animation of 'Player' to 'Grab 2'

'Player' animation 'Grab 2' is over
-Set Position of 'Player' to -5,-15 from 'Position Tester'
-Activate Group 'Wall Hanging'
-Deactivate Group 'Hang Left 2'

(Again, adjust the coordinates.)

Now, you have a pretty good system here, but it probably interferes with your platform engine, so remember, when you activate the hanging events, deactivate your walking, jumping, and falling events, and vice versa

You're almost done, time to bugshoot!

Add the following events to the Group "Hang Left 2'.

'Player' animation 'Grab 1' is playing
-Set position of 'Player' to 0,0 from 'Position Tester'

'Player' animation 'Grab 2' is playing
-Set position of 'Player' to 0,0 from 'Position Tester'

And that's that!

This may interfere slightly with your platform engine, as I’m sure it’s slightly different than mine, but with a little tweaking of the events, it can be done.

(This is my first article, so don't slam it too much, I know it isn't too well written.)