I agree with Feralidragon, it is unlikely that anyone has done this before.
But, there is nothing stopping you from doing it now!
The vanilla weapons that actually use a MuzzleFlash are:
-Enforcer* (and DoubleEnforcer by extension)
-Minigun2*
-PulseGun
-SniperRifle
-UT_FlakCannon
*The Enforcer and Minigun2 both have extended code for multiple MuzzleFlash textures.
This is all the MuzzleFlash variables (from Weapon class)
Code: Select all
// Muzzle Flash
// weapon is responsible for setting and clearing bMuzzleFlash whenever it wants the
// MFTexture drawn on the canvas (see RenderOverlays() )
var bool bSetFlashTime;
var(MuzzleFlash) bool bDrawMuzzleFlash;
var byte bMuzzleFlash;
var float FlashTime;
var(MuzzleFlash) float MuzzleScale, FlashY, FlashO, FlashC, FlashLength;
var(MuzzleFlash) int FlashS; // size of (square) texture/2
var(MuzzleFlash) texture MFTexture;
var(MuzzleFlash) texture MuzzleFlare;
var(MuzzleFlash) float FlareOffset;
In the editor you can look at the DefaultProperties of any of the weapons I listed before to get an idea of how they work.
You don't have to look at or understand any of the code relating to MuzzleFlash or Weapons** outside of these variables.
**Enforcer has an extra variable:
Code: Select all
var() texture MuzzleFlashVariations[5];
**Minigun2 has one too:
Code: Select all
var() texture MuzzleFlashVariations[10];
So with all of this, all you need to do is wright a Mutator to change the MuzzleFlash variables from whatever they are to whatever you want.
There are many ways to go about this but I would use the CheckReplacement Mutator function.
As an example:
Code: Select all
class NameOfMutator expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if (Other.IsA('SniperRifle'))
{
Weapon(Other).FlashC = 0.1;
Weapon(Other).FlashLength = 0.02;
Weapon(Other).FlashO = 0.015;
Weapon(Other).FlashY = 0.16;
Weapon(Other).MFTexture = Texture'Botpack.Skins.Flakmuz';
Weapon(Other).MuzzleFlashMesh = Mesh'Botpack.muzzFF3';
Weapon(Other).MuzzleFlashScale = 0.4;
Weapon(Other).MuzzleFlashTexture = Texture'Botpack.Skins.MuzzyFlak';
Weapon(Other).MuzzleScale = 2.0;
return false;
}
}
This (entirely untested) Mutator changes the MuzzleFlash of the SniperRifle to the MuzzleFlash of the UT_FlakCannon.
By extension, to modify all the Weapons you want:
Code: Select all
class NameOfMutator expands Mutator;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if (Other.IsA('Weapon you want to change'))
{
Weapon(Other).make changes here
return false;
}
if (Other.IsA('Another Weapon you want to change'))
{
Weapon(Other).make changes here
return false;
}
if (Other.IsA('Another Weapon you want to change'))
{
Weapon(Other).make changes here
return false;
}
if (Other.IsA('Another Weapon you want to change'))
{
Weapon(Other).make changes here
return false;
}
}
Best of luck!