Hi all, I am trying to create a very basic mutator to replace a weapon with a modified one (just a few default properties changed) but I haven't had any luck in making it work.
The code compiles fine and I can select it in the mutator list but it doesn't have any effect. I omitted is filling out the .ini file in the config folder, but shouldn't it work anyway?
Am I missing something?
The code compiles fine and I can select it in the mutator list but it doesn't have any effect. I omitted is filling out the .ini file in the config folder, but shouldn't it work anyway?
Am I missing something?
Code:
class NewLink extends UTMutator;
function bool CheckReplacement(Actor Other)
{
local UTWeaponPickupFactory WF;
if (Other.IsA('UTWeap_LinkGun') && !Other.IsA('UTWeap_LinkGunNew'))
{
ReplaceWith(Other, "UTWeap_LinkGunNew");
return true;
}
WF = UTWeaponPickupFactory(Other);
if (WF != None && WF.WeaponPickupClass == class'UTWeap_LinkGun')
{
WF.WeaponPickupClass = class'UTWeap_LinkGunNew';
}
return true;
}
DefaultProperties
{
GroupNames[0]="WEAPONMOD"
}
Last edited: