• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code [Help] Custom Melee weapon Problem

Josko

Grizzled Veteran
Nov 2, 2012
107
0
When I make my own custom melee weapon for various reasons like, to change wieght or damage, everything works fine until I drop it, then it reverts to the default melee weapon.

This happends with all melee weapons, but if it is a Firearm weapon like Scar, LAW or M99, it don't do that when I drop them, they keep being customized like intended. But if it's a melee weapon, it will instantly be reverted to the default one when dropped and picked up.

It's only with melee weapons like Katana, Claymore that it reverts to it's default one when dropped.

Anyone know why?

I'm probably missing some line or the melee weapons work a little different than the guns.
 
When you drop the weapon it reverts to the pickup class which is set in the weapon's class file. Your weapon has it's pickup class set to default. You can't just change one of the files related to each weapon and have it work properly. For an example, the katana's pickup class is KatanaPickup.uc. In the weapon class file the line would read PickupClass=Class'KFMod.KatanaPickup'. This is what you need to change to your modified pickup class. The weapon once picked up off the ground, would refer to it's pickup class and give you whatever that happens to be set to.
 
Upvote 0