Changing jump height

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Changing jump height

Post by The Ultimate DooMer »

I need to alter the player's jumping height without changing the gravity (which would screw up other effects). I remember something about LWM doing a 'cat jump' in one of her mods with a ThrustThingZ script, but I don't know how she avoided the problem of being able to jump in mid-air.

I need the jump to act exactly like the normal jump (in other words: no fixed delays), so is there some way to check whether or not the player is on the ground/in the air without putting sector actions in every single sector to change a variable?
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

You might be able to do it with some combination of:
http://www.zdoom.org/wiki/index.php?title=GetActorZ
http://www.zdoom.org/wiki/index.php?tit ... ctorFloorZ

But I'm not sure how you'd specify what sector to check for GetSectorFloorZ.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Is the GetActorZ relative to the ground (like a thing's z-height) or is it the total co-ordinate like x and y?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It's absolute. But there's also a GetActorFloorZ so you can easily calculate the difference. Don't use GetSectorFloorZ because it might give incorrect results if you are standing over a dropoff.

As for the jump factor, that's unfortunately hard coded into the player classes, otherwise this might be much easier.
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Post by David Ferstat »

I thought that the jump was implemented with ThrustThingZ (correct term?).

Could you not simply use another to boost the effect?
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Prehaps a sv_jumpstrength or player property for jumpings should be around?
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Graf Zahl wrote:...there's also a GetActorFloorZ...
Aha, so there is. That should be all that's needed, I think.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

The wiki wrote:GetActorFloorZ returns the highest floor point underneath the actor.
So that's basically what I'm after then? (if i have the script checking the difference between GetActorZ and GetActorFloorZ when the button is pressed and stopping the jump if it's above 0)

argh: what if the player is on a bridge or other thing?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Then floorz should come from the other thing's top.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Which could be any height really :? (and with no way of telling the script that you're on a bridge, barrel etc.)

In short, we need a player property for jump height. ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The Ultimate DooMer wrote: In short, we need a player property for jump height. ;)

Most definitely!
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Damnit, there's a lot of stuff I can't do for Serpent yet :?
Locked

Return to “Editing (Archive)”