How can I program a character to go up and down a ladder or rope?
My question is, if I have a character that moves from left to right on the ground and encounters a ladder or rope, could it go up and down when it touches it?
(01-29-2026, 04:28 PM)aliensoldier Wrote: [ -> ]How can I program a character to go up and down a ladder or rope?
My question is, if I have a character that moves from left to right on the ground and encounters a ladder or rope, could it go up and down when it touches it?
If the player rectangle overlaps a ladder rectangle and the ladder has been "activated" (pressing up), gravity doesn't apply (player can move freely in any direction) but player can still collide with obstacles

Here is a 'blast from the past'....
[
attachment=569]
There is also 'bulb boy' in the N7 examples in the 'other' folder.
They were the first programs that I could think of that use ladders.
I hope this helps.
J
Thanks.
And if I want to add a slope so the player can go up and down it, how would that work?
(01-30-2026, 03:17 PM)aliensoldier Wrote: [ -> ]Thanks.
And if I want to add a slope so the player can go up and down it, how would that work?
Well, that depends on how complicated you want to make it. But, ah, pushing a rectangle (player/enemy) out from a triangle (slope) if they intersect shouldn't be that hard (haha, it is)

But right now I'm playing Team Fortress 2
