| Home Page | Recent Changes | Preferences

Dma/MutMultiJump

//=============================================================================
// 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.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In