| Home Page | Recent Changes | Preferences

Dma/MutFireRate

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
}

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In