I have modified the FlameThrower class by subclassing (FlameThrowerMZ).
But I am not able to buy the modified version at the trader. When I try to buy it, I can hear the "buy sound" but no money is spent and no FlameThrower is in my inventory.
Here is my CheckReplacement:
If I add a Log call in the if I can see it in the KillingFloor.log when I buy the weapon.
What am I doing wrong?
Thanks.
But I am not able to buy the modified version at the trader. When I try to buy it, I can hear the "buy sound" but no money is spent and no FlameThrower is in my inventory.
Here is my CheckReplacement:
Code:
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
bSuperRelevant = 0;
if (Other.Class == Class'FlameThrower')
{
ReplaceWith(Other, String(Class'FlameThrowerMZ'));
return false;
}
return true;
}
Code:
class FlameThrowerMZ extends FlameThrower;
exec function ReloadMeNow()
{
// ...
}
defaultproperties
{
}
Thanks.