PDA

View Full Version : Weapon mutator


Shuriken
24th Jun 2003, 02:02 PM
Hey guys, wondering if I could get some help :)
I've been doing a weapon mute, and now it's come to the stage where I need to change the ammo. I've coded the ammo and all, but need to know what to change in the mutator class to replace the minigun ammo with it. Here's my mute code:

class FheonixMut extends Mutator
config(user);

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
bSuperRelevant = 0;
if ( xWeaponBase(Other) != None )
{
if ( xWeaponBase(Other).WeaponType == class'Minigun' )
xWeaponBase(Other).WeaponType = class'Fheonix';
else
return true;
}
else if ( WeaponPickup(Other) != None )
{
if ( string(Other.Class) == "xWeapons.MinigunPickup" )
ReplaceWith( Other, "Fheonix.FheonixPickup");
else
return true;
}
else
return true;

return false;
}

defaultproperties
{
GroupName="Fheonix"
FriendlyName="Fheonix"
Description="Replace the Minigun with the Fheonix."
}


Can someone tell me what to do to replace minigun ammo pickups with new ammo? Thx :)

EvilDrWong
29th Jun 2003, 04:23 AM
hmm... dont know how this one slipped through the net...
in CheckReplacement add something akin to this:

if(Other.IsA('MinigunAmmoPickup'))
{
if(!(Other.IsA('myMiniAmmoPickup')))
{
ReplaceWith(Other, "Fheonix.myMiniAmmoPickup");
return false;
}
else
return True;
}