1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

[UT2003] Jumping anytime in (mid-)air?

Discussion in 'Programming' started by SharQueDo, Oct 20, 2004.

  1. SharQueDo

    SharQueDo Ph34r me!

    Joined:
    Dec 22, 2003
    Messages:
    63
    Likes Received:
    0
    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.
     
  2. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    Elaborate on that a bit more.
     
  3. SharQueDo

    SharQueDo Ph34r me!

    Joined:
    Dec 22, 2003
    Messages:
    63
    Likes Received:
    0
    I just want the player to have the ability to jump while falling.
     
  4. Captain Kewl

    Captain Kewl I know kewl.

    Joined:
    Feb 13, 2001
    Messages:
    794
    Likes Received:
    0
    Use a custom pawn that overrides DoJump().
     
  5. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    You do not want to use a custom pawn in a mutator.
     
  6. SharQueDo

    SharQueDo Ph34r me!

    Joined:
    Dec 22, 2003
    Messages:
    63
    Likes Received:
    0
    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?
     
  7. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    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):
    Code:
    if ( !bUpdating && CanDoubleJump()&& [b](Abs(Velocity.Z) < 100)[/b] && IsLocallyControlled() )
    
    Removing the bit in bold would probably achieve the effect you are after.
     
  8. SharQueDo

    SharQueDo Ph34r me!

    Joined:
    Dec 22, 2003
    Messages:
    63
    Likes Received:
    0
    How can I implent it within a mutator? Modifypawn or something?
     
  9. porkmanii

    porkmanii New Member

    Joined:
    Sep 9, 2004
    Messages:
    129
    Likes Received:
    0
    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?
    ..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...
    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.
     
    Last edited: Oct 26, 2004

Share This Page