Legacy:Dma/MutMultiJump - Unreal Wiki

# Legacy:Dma/MutMultiJump

### From Unreal Wiki, The Unreal Engine Documentation Site

< Legacy:Dma

- See also dma/MutMultiJumpConfig
- http://www.coe.uncc.edu/~danderse/www/MultiJump-DMA3.zip

    //=============================================================================
    // MultiJump - Allows you to jump as many times as you want!
    // Made/Hacked by dma.
    // http://www.coe.uncc.edu/~danderse/
    //=============================================================================
    class MutMultiJump extends Mutator
       config;

    var config int MaxMultiJumpCount;
    var config int MultiJumpBoost;

    function ModifyPlayer(Pawn Other)
    {
       local xPawn x;
       x = xPawn(Other);

       if(x != None) {
          // Increase the number of times a player can jump in mid air
          x.MaxMultiJump = MaxMultiJumpCount;

          // Also increase a bit the amount they jump each time
          x.MultiJumpBoost = MultiJumpBoost;
       }
       if ( NextMutator != None )

          NextMutator.ModifyPlayer(Other);
    }

    //
    // server querying
    //
    function GetServerDetails( out GameInfo.ServerResponseLine ServerState )
    {
       // append the mutator name.
       local int i;
       i = ServerState.ServerInfo.Length;
       ServerState.ServerInfo.Length = i+3;
       ServerState.ServerInfo[i].Key = "Mutator";
       ServerState.ServerInfo[i].Value = GetHumanReadableName();
       ServerState.ServerInfo[i+1].Key = "MutMultiJump";
       ServerState.ServerInfo[i+1].Value = String(MaxMultiJumpCount) $ " jumps";
       ServerState.ServerInfo[i+2].Key = "MutMultiJump";
       ServerState.ServerInfo[i+2].Value = String(MultiJumpBoost) $ " boost";
    }

    defaultproperties
    {
       IconMaterialName="MutatorArt.nosym"
       ConfigMenuClassName="MultiJump.MutMultiJumpConfig"
       GroupName="Jumping"
       FriendlyName="MultiJump"
       Description="Jump as much as you want!"
       MaxMultiJumpCount=1000
       MultiJumpBoost=50
    }

Mychaeel: Instead of calling NextMutator in ModifyPlayer yourself, just call Super.ModifyPlayer.

Eldhrin: Being incredibly dense here, what's the ServerDetails function for? I can't recall seeing it before...

Dma: It is supposed to add key/value pairs to the server query. The idea is that you could exclude servers that allow more than 10 jumps (because things get freaky). I don't know if it works.

Category: Legacy Custom Class (UT2003)

##### Views

- Legacy
- Discussion
- Current revision

##### Search