Page 1 of 2

[ZScript] Ledge climbing

Posted: Thu Jan 11, 2018 6:07 pm
by dodopod


This mod allows the player to climb ledges by holding 'Jump'. It works using a player class derived from DoomPlayer,
so it will take some slight changes if you want to use it in Hexen, for example.

Download

Re: [ZScript] Ledge climbing

Posted: Thu Jan 11, 2018 7:34 pm
by Rip and Tear
This is really cool, and seems to work pretty well.

One thing that should probably be fixed is that it doesn't check if there is enough room to climb up.

Re: [ZScript] Ledge climbing

Posted: Fri Jan 12, 2018 2:21 am
by Tormentor667
Prince of Persia Doom anyone? :)

Re: [ZScript] Ledge climbing

Posted: Fri Jan 12, 2018 1:45 pm
by Matt
Rip and Tear wrote:One thing that should probably be fixed is that it doesn't check if there is enough room to climb up.
On the other hand, it might be better that it doesn't - sometimes you might want to just hang onto a ledge to delay a fall until something's passed by, or the platform itself could be gradually lowering and you just need to hang on for a second or so before there's enough room to get on.


edit: aww man this is sooo much cleaner than the kludgefest I'm using right now!

Re: [ZScript] Ledge climbing

Posted: Fri Jan 12, 2018 2:15 pm
by Caligari87
Mind if I take this and make some adjustments, with credit of course? I was trying to do something like this myself, and failing miserably.

8-)

Re: [ZScript] Ledge climbing

Posted: Fri Jan 12, 2018 2:33 pm
by dodopod
Matt wrote:On the other hand, it might be better that it doesn't - sometimes you might want to just hang onto a ledge to delay a fall until something's passed by, or the platform itself could be gradually lowering and you just need to hang on for a second or so before there's enough room to get on.
That's true, though I should probably add a special case for that, or something. As it is, the player bounces up and down when they get to the top.
Caligari87 wrote:Mind if I take this and make some adjustments, with credit of course? I was trying to do something like this myself, and failing miserably.

8-)
Sure.

Re: [ZScript] Ledge climbing

Posted: Sat Jan 13, 2018 1:18 pm
by dodopod
New version. Now it works w/ 3D floors, and when there's not enough clearance to get on top of a ledge. The player will automatically crouch when they reach the top of a ledge, in case they need to fit into a small space. Or, if there still isn't enough room, they'll just hang on, until the player lets go.

Re: [ZScript] Ledge climbing

Posted: Sat Jan 13, 2018 3:37 pm
by Nash
This feels almost like Dying Light's ledge climbing mechanics. Good job!

Re: [ZScript] Ledge climbing

Posted: Tue Feb 06, 2018 2:30 pm
by MrToots
I'm kind of a noob at ACS/Zscript how do I make it so the script works with my pre made playercharacter?

Re: [ZScript] Ledge climbing

Posted: Tue Feb 06, 2018 3:35 pm
by dodopod
I'm not sure exactly what you're trying to do, so it's hard to give precise instructions. The main thing is to find the file zscript/climbing/climbing_player.zc. The first line should say

Code: Select all

class ClimbingPlayer : DoomPlayer
Change "DoomPlayer" to the name of your player class. If that doesn't work, send me your PK3 so I can see what's wrong.

Re: [ZScript] Ledge climbing

Posted: Sat Apr 07, 2018 10:17 am
by Treck
Sorry for the bump, I'm having trouble getting this to work with other classes, I've tried to do what was said bellow but whenever i replace "DoomPlayer" with the class i want i just get an error on startup, any help would be appreciated.

Re: [ZScript] Ledge climbing

Posted: Sat Apr 07, 2018 5:51 pm
by dodopod
That solution didn't end up working, anyway. What did work was to have the custom player class inherit from ClimbingPlayer. In other words

Code: Select all

class YourPlayerClass : ClimbingPlayer
But I'm not entirely sure what you're trying to do, so that may or may not work.

Re: [ZScript] Ledge climbing

Posted: Sun Apr 08, 2018 3:19 am
by Treck
Thanks for the help, unfortunately i still cant make it work, how i have it set up

Code: Select all

class Doomer3 : ClimbingPlayer
In a separate PK3 the class is defined in KEYCONF and looks like

Code: Select all

clearplayerclasses
addplayerclass Doomer3
This is the message i get on startup if anyone can suggest what im doing wrong.
Spoiler:

Re: [ZScript] Ledge climbing

Posted: Sun Apr 08, 2018 10:50 am
by dodopod
Wait, did you change the line that said

Code: Select all

class ClimbingPlayer : DoomPlayer
to

Code: Select all

class Doomer3 : ClimbingPlayer
That's not what I meant. What I meant was, go to wherever Doomer3 is defined, and change that line to

Code: Select all

class Doomer3 : ClimbingPlayer

Re: [ZScript] Ledge climbing

Posted: Sun Apr 08, 2018 11:40 am
by Treck
Ahh, yes, That did the trick thanks heaps, I'm really enjoying this script it works wonderful!