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.
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.
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.
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
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
This is the message i get on startup if anyone can suggest what im doing wrong.
Spoiler:
climbing.pk3:zscript/climbing/climbing_player.zc, line 1: Class Doomer3 has unknown base class ClimbingPlayer
climbing.pk3:zscript/climbing/climbing_player.zc, line 11: Properties can only be defined for actors
climbing.pk3:zscript/climbing/climbing_player.zc, line 1: Doomer3: Non-actor classes may not have defaults
climbing.pk3:zscript/climbing/climbing_player.zc, line 21: Attempt to override non-existent virtual function CheckJump