Dismounting a ladder

Get help using Construct 2

Post » Wed Feb 20, 2013 6:41 am

I'm working on my 2d platformer state machine setup and hit another roadblock, this time related to ladders and specifically, how to dismount them.

I've looked over the examples but they either allow for Y movement on the ladder(I want the character locked to the center of the ladder on Y while climbing) or they require a separate key binding to dismount.

What I want is to have the player exit the climb state when they reach the ground (I have this working) or when they press left or right when they are within a few pixels of a platform adjacent to the ladder (not yet working).

I want pressing right arrow to dismount onto the platform to the right.

I assume I need to find a way to compare the playerCapsule and Tile's Y position but I'm not having much luck doing it. I'm still unclear on how to have it compare the nearest tile value, or how to set a small range of pixels that will allow the dismount. I suspect the solution lies with allowing the Player to continue to climb when there is Collision with a tile but to dismount when their Y origins line up with an offset.

The .capx is here:

The climbing "code" are in events 17-22.

Thanks in advance for any help.switchblade3272013-02-20 06:43:20
Posts: 20
Reputation: 1,015

Post » Wed Feb 20, 2013 8:57 am

In your picture your stop sign would be an ideal place for an invisable sprite...this could trigger a dismount animation or allow x axis movement..
As long as I can move left, right and fire, I'm Happy...
Posts: 655
Reputation: 12,235

Post » Wed Feb 20, 2013 5:52 pm

Aha! That makes sense, especially since I want to add ledge-climbing. I hadn't thought of that. Thanks!
Posts: 20
Reputation: 1,015

Return to How do I....?

Who is online

Users browsing this forum: chaoyue123, Leondr, sTARKi, Yahoo [Bot] and 34 guests