You will need the AssaultAmmoPickup, GrenadeAmmo and yes you'll also need to use the above mutator to get it working.
In the ammopickup class change ammoamout to whatever amount you want the pickup to give when you pick it up, and change the InventoryType to your GrenadeAmmo class.
In the grenadeammo class change the maxammo to however much you want the weapon to hold (16, 24 whatever). InitialAmount is how much ammo the weapon starts with. Change the pickupclass to your new ammopickup class.
In the AssaultGrenade class (the grenade fire class) change AmmoClass to your new one (GrenadeAmmo).
Now, I've just realised that the mutator I mentioned won't work for what you want Think I was asleep at the time lol. You're replacing the AssaultRifle which is an Inventory Weapon and doesn't normally have a pickup base like the other weapons. Therefore you have to use a slightly different mutator:
Use that code for the mutator instead. The other one can be used for any of the other weapons that use a pickupbase.
In the ammopickup class change ammoamout to whatever amount you want the pickup to give when you pick it up, and change the InventoryType to your GrenadeAmmo class.
In the grenadeammo class change the maxammo to however much you want the weapon to hold (16, 24 whatever). InitialAmount is how much ammo the weapon starts with. Change the pickupclass to your new ammopickup class.
In the AssaultGrenade class (the grenade fire class) change AmmoClass to your new one (GrenadeAmmo).
Now, I've just realised that the mutator I mentioned won't work for what you want Think I was asleep at the time lol. You're replacing the AssaultRifle which is an Inventory Weapon and doesn't normally have a pickup base like the other weapons. Therefore you have to use a slightly different mutator:
Code:
class AssaultRifleMut extends Mutator
config(user);
function string GetInventoryClassOverride(string InventoryClassName)
{
if ( InventoryClassName == "XWeapons.AssaultRifle")
{
InventoryClassName = "YourPackage.YourAssaultRifle";
}
if ( NextMutator != None )
return NextMutator.GetInventoryClassOverride(InventoryClassName);
return InventoryClassName;
}
function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
if ( AssaultAmmoPickup(Other) != None )
{
ReplaceWith( Other, "YourPackage.YourAssaultAmmoPickup");
}
else
return false;
}
else
return true;
return false;
}
defaultproperties
{
GroupName="AssaultRifle"
FriendlyName="Custom Assault Rifle"
Description="Description goes here."
}
Use that code for the mutator instead. The other one can be used for any of the other weapons that use a pickupbase.