[ZScript] Ledge climbing

Post your example zscripts/ACS scripts/etc here.

[ZScript] Ledge climbing

Postby dodopod » Thu Jan 11, 2018 7:07 pm



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
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] Ledge climbing

Postby Rip and Tear » Thu Jan 11, 2018 8:34 pm

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.
User avatar
Rip and Tear
 
Joined: 02 May 2017

Re: [ZScript] Ledge climbing

Postby Tormentor667 » Fri Jan 12, 2018 3:21 am

Prince of Persia Doom anyone? :)
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: [ZScript] Ledge climbing

Postby Matt » Fri Jan 12, 2018 2:45 pm

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!
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [ZScript] Ledge climbing

Postby Caligari87 » Fri Jan 12, 2018 3:15 pm

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-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: [ZScript] Ledge climbing

Postby dodopod » Fri Jan 12, 2018 3:33 pm

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.
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] Ledge climbing

Postby dodopod » Sat Jan 13, 2018 2:18 pm

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.
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] Ledge climbing

Postby Nash » Sat Jan 13, 2018 4:37 pm

This feels almost like Dying Light's ledge climbing mechanics. Good job!
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: [ZScript] Ledge climbing

Postby MrToots » Tue Feb 06, 2018 3:30 pm

I'm kind of a noob at ACS/Zscript how do I make it so the script works with my pre made playercharacter?
User avatar
MrToots
 
Joined: 22 Sep 2017

Re: [ZScript] Ledge climbing

Postby dodopod » Tue Feb 06, 2018 4:35 pm

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.
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] Ledge climbing

Postby Treck » Sat Apr 07, 2018 11:17 am

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.
Treck
 
Joined: 07 Apr 2018

Re: [ZScript] Ledge climbing

Postby dodopod » Sat Apr 07, 2018 6:51 pm

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.
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] Ledge climbing

Postby Treck » Sun Apr 08, 2018 4:19 am

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:
Treck
 
Joined: 07 Apr 2018

Re: [ZScript] Ledge climbing

Postby dodopod » Sun Apr 08, 2018 11:50 am

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
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] Ledge climbing

Postby Treck » Sun Apr 08, 2018 12:40 pm

Ahh, yes, That did the trick thanks heaps, I'm really enjoying this script it works wonderful!
Treck
 
Joined: 07 Apr 2018


Return to Script Library

Who is online

Users browsing this forum: HMNuke93 and 1 guest