PDA

View Full Version : [UT2003] Jumping anytime in (mid-)air?


SharQueDo
20th Oct 2004, 05:58 AM
You know you can jump again in a peak of a jump, how can I make a mutator that lets you jump anytime in air (even when falling)? I've looked but couldn't find it.

[SAS]Solid Snake
20th Oct 2004, 06:08 AM
I've looked but couldn't find it.Elaborate on that a bit more.

SharQueDo
22nd Oct 2004, 11:01 AM
I just want the player to have the ability to jump while falling.

Captain Kewl
22nd Oct 2004, 11:07 AM
Use a custom pawn that overrides DoJump().

[SAS]Solid Snake
22nd Oct 2004, 12:54 PM
You do not want to use a custom pawn in a mutator.

SharQueDo
22nd Oct 2004, 02:24 PM
Maybe I'm implenting it in a complete mod. Just wondering how to do it. And what's the difference between Pawn and xPawn? Which one's DoJump() should be modified? And what would I want to modify?

porkmanii
24th Oct 2004, 11:22 AM
You would want to sub-class xPawn, as that is used for all the official UT2004 game-types (it also contains the multi-jump code). Here's the relevant line of code (in xPawn.DoJump):

if ( !bUpdating && CanDoubleJump()&& (Abs(Velocity.Z) < 100) && IsLocallyControlled() )

Removing the bit in bold would probably achieve the effect you are after.

SharQueDo
24th Oct 2004, 02:12 PM
How can I implent it within a mutator? Modifypawn or something?

porkmanii
26th Oct 2004, 01:50 AM
How can I implent it within a mutator? Modifypawn or something?
ModifyPlayer let's you modify the Pawn, after it is spawned, so no, you couldn't use it to change the player's Pawn class.

Within a mutator?
Maybe I'm implenting it in a complete mod. Just wondering how to do it. And what's the difference between Pawn and xPawn? Which one's DoJump() should be modified? And what would I want to modify?
..or maybe you aren't implementing it in a complete mod (I suspect you aren't).

To answer the question, all of the stock UT2004 game-types use xPawn. If you were to make a custom Pawn class, you should sub-class whatever Pawn class is used by the game-type your custom Pawn is intended for. Be careful about changing the pawn class if it is not xPawn, however, because game-types such as Mutant use custom pawn classes which are essential to the game (such as xMutantPawn, which is used by the player who is the mutant).

You could probably change a player's Pawn class in Mutator.PlayerChangedClass, but...
Solid Snake']You do not want to use a custom pawn in a mutator.

Edit- turns out xMutantPawn is used by all players in a Mutant game, whether they are the Mutant or not. If you wanted, you could make a sub-class of xMutantPawn specifically for always allowing double jumps (regardless of velocity) in the Mutant game-type.