[Solved] Climbing a ladder

Get help using Construct 2

Post » Tue Nov 08, 2011 12:29 pm

This is fun, I never needed this. But seeing now... I think in some ways to use that. Thank you o/
B
203
S
37
G
13
Posts: 136
Reputation: 29,523

Post » Mon Feb 04, 2013 3:31 am

I found the same problem with ladder and this is very helpful
Thanks guys
B
12
S
3
G
4
Posts: 56
Reputation: 3,235

Post » Mon Mar 18, 2013 1:18 am

Everyone's examples are dead links. Anyone have updated ones?
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Thu Apr 04, 2013 11:21 pm

Hey guys, I just realized we're all overcomplicating this. You don't need to spawn extra solid blocks, then remove them etc.

I've made a terreria clone where you can place ladders, each of them being a 32*32 block. You can place them in a vertical or horizontal series to make long ladders. All you need to do is give the ladder sprite a jump-through behaviour. This will cause the player to walk on the top of the ladder, instead of falling back down once you've climbed to the top. Of course it also allows the player to climb upwards through it. Then all you need to do is add an event to use platform down jump-through behaviour when the player presses down (this allows descent from the top of the ladder). It also solves the jumping from a distance problem. If you fall on the ladder(s) from above you land on it as a solid. Come at it from the side or below, and you climb.

Much simpler to implement this way, and none of the nasty bugs with the previous method.    





** updated to include proper animation support, and one bug fix
*all source graphics copyright their respective creators, only used as placeholderVenivididormi2013-04-09 01:21:35
B
8
S
2
Posts: 63
Reputation: 1,223

Post » Mon Apr 29, 2013 4:31 pm

What kind of value is the "climbSpeed" ? Only see it being reffered to 2 times. Sorry I'm still learning and trying to implement this into my platformer..!Seemarz2013-04-29 16:32:31
B
3
Posts: 1
Reputation: 177

Post » Mon Apr 29, 2013 5:37 pm

[QUOTE=Seemarz] What kind of value is the "climbSpeed" ? Only see it being reffered to 2 times. Sorry I'm still learning and trying to implement this into my platformer..![/QUOTE]

the "climbSpeed" is used to see how fast you rise up when climbing (Self.Y - climbSpeed = we rise of climb speed), and the "*dt" thingy is for frame-rate independancy
https://www.scirra.com/forum/viewtopic.php?t=152506

And that is why you shall respect the bug reports guidelines, not only giving a capx is making the bug reproductible in one click in a situation they can work with (less time wasted trying to reproduce vague instructions) but also it helps filtering false positives.

Game design is all about decomposing the core of your game so it becomes simple instructions.
B
42
S
17
G
16
Posts: 2,090
Reputation: 15,347

Previous

Return to How do I....?

Who is online

Users browsing this forum: Aserak2012, Colorfish, Waltuo and 4 guests