• Welcome to AtomicTorch Studio Forums.
 

Adding Damage to tree's on range weapon

Started by midnightxrush, May 18, 2019, 01:21:01 AM

midnightxrush

Like title states how would one add damage to tree's to make a range weapon with ammo act like a tool axe? iv tried to add. using AtomicTorch.CBND.CoreMod.Items.Tools.Axes; to top and then add.
public override double DamageToNonTree => 20;
public override double DamageToTree => 70;

but in the end it cant find it to call to it. for some reason.

ai_enabled

Hello!

You need to inherit your range weapon not only from a range weapon base class but also from IProtoItemToolWoodcutting interface. Then it will require adding property DamageToTree which need to be implemented this way (without override):
public double DamageToTree => 70;

If it doesn't work and you stuck, please post your item class here and I'll help.

Regards!