I'm a doctor, not a mechanic

Legacy:Trystan/12 26 02

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

HOWTO: Modify Player Speed[edit]

You can either subclass xPawn or you can create a mutator.

Subclassing xPlayer[edit]

The following is simple UnrealScript version of an extended xPawn that modifies the speeds of the player in various ways.

class MyPawn extends xPawn;
 
defaultproperties
{
    GroundSpeed         =   350.000000      // 220
    WaterSpeed          =   210.000000      // 110
    AirSpeed            =   320.000000      // 220
    JumpZ               =   210.000000      // 170
    AccelRate           =   1024            // half normal
    WalkingPct          =   0.60000         // walking = walkspeed * this
    CrouchedPct         =   0.45000         // crouched moving = walkspeed * this
    MaxFallSpeed        =   665             // speed needed to reach before falling damage
 
    MultiJumpRemaining  =   0
    MaxMultiJump        =   0
    MultiJumpBoost      =   0
    bCanDoubleJump      =   False
}

Mutator[edit]

Create a simple mutator and in ModifyPlayer add in code to change the above variables, i.e.:

function ModifyPlayer( Other )
{
     Other.default.GroundSpeed =     350.000000;
     Other.default.WaterSpeed  =     210.000000;
     Other.default.AirSpeed    =     320.000000;
}