| Home Page | Recent Changes

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
}

Comments:


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

Wormbo: It's obviously UT2003 code.


Category Custom Class

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

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