Page 1 of 2

[ZScript] Ledge climbing

PostPosted: Thu Jan 11, 2018 7: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

PostPosted: Thu Jan 11, 2018 8: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

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

Re: [ZScript] Ledge climbing

PostPosted: Fri Jan 12, 2018 2: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

PostPosted: Fri Jan 12, 2018 3: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

PostPosted: Fri Jan 12, 2018 3: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

PostPosted: Sat Jan 13, 2018 2: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

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

Re: [ZScript] Ledge climbing

PostPosted: Tue Feb 06, 2018 3: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

PostPosted: Tue Feb 06, 2018 4: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 allExpand view
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

PostPosted: Sat Apr 07, 2018 11: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

PostPosted: Sat Apr 07, 2018 6: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 allExpand view
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

PostPosted: Sun Apr 08, 2018 4:19 am
by Treck
Thanks for the help, unfortunately i still cant make it work, how i have it set up
Code: Select allExpand view
class Doomer3 : ClimbingPlayer


In a separate PK3 the class is defined in KEYCONF and looks like
Code: Select allExpand view
clearplayerclasses
addplayerclass Doomer3


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

Re: [ZScript] Ledge climbing

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

Code: Select allExpand view
class ClimbingPlayer : DoomPlayer


to

Code: Select allExpand view
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 allExpand view
class Doomer3 : ClimbingPlayer

Re: [ZScript] Ledge climbing

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