Legacy:Dma/MutFireRate - Unreal Wiki

# Legacy:Dma/MutFireRate

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

< Legacy:Dma

## Experimental code that demonstrates the modification of the fire rate of a weapon.

    class MutFireRate extends Mutator;

    var config float FireRateScale;

    function PostBeginPlay() {
       class'RocketFire'.default.FireRate *= FireRateScale;
       class'RocketFire'.default.FireAnimRate *= FireRateScale;
    }

    function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
    {
       local RocketFire RF;
       RF = RocketFire(Other);

       if (RF != None) {
          RF.FireRate *= FireRateScale;
          RF.FireAnimRate *= FireRateScale;
       }

       return true;
    }

    defaultproperties
    {
       FireRateScale=0.2
    }

Comments:

Eliot: This wont work WeaponFire Classes to Actor will always fail ;).

Wormbo: It's obviously UT2003 code.

sweavo: categorized as such

Category: Legacy Custom Class (UT2003)

##### Views

- Legacy
- Discussion
- Current revision

##### Search