Kronas Posted July 31, 2018 Share Posted July 31, 2018 so im thinking if i can make a character have increased damage if using an axe what could be the proper function for that ? Link to comment Share on other sites More sharing options...
Wolf_EX Posted July 31, 2018 Share Posted July 31, 2018 (edited) Can try editing the onequip function of the axe to have if owner:HasTag("axespecialist") then inst.components.weapon:SetDamage(TUNING.AXE_DAMAGE * AXEMULTIPLIER) else inst.components.weapon:SetDamage(TUNING.AXE_DAMAGE) end If you want to do it from the character then activeitem = inst.components.inventory:GetActiveItem() if activeitem.prefab == "axe" then activeitem.components.weapon:SetDamage(TUNING.AXE_DAMAGE * AXEMULTIPLIER) end or activeitem = inst.components.inventory:IsItemEquipped("axe") if activeitem ~= nil then activeitem.components.weapon:SetDamage(TUNING.AXE_DAMAGE * AXEMULTIPLIER) end I never tested any of these and don't remember using any of the inventory functions before so not too sure if these will work. Not sure what event you even put those in, maybe the OnEqup event of playercommon or you can add your own inst:ListenForEvent("equip", OnEquip)? Edited July 31, 2018 by Wolf_EX Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now