Changing jump height
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.
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.
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
Changing jump height
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?
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?
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.
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.
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
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.
As for the jump factor, that's unfortunately hard coded into the player classes, otherwise this might be much easier.
- David Ferstat
- Posts: 1113
- Joined: Wed Jul 16, 2003 8:53 am
- Location: Perth, Western Australia
- Contact:
- Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
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)The wiki wrote:GetActorFloorZ returns the highest floor point underneath the actor.
argh: what if the player is on a bridge or other thing?
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone