MystPhysX Posted July 26, 2015 Share Posted July 26, 2015 (edited) SOLVED, see comment below. Hey guys, So a couple days back I published a mod on the workshop called Machete (workshop-486322336) and some one requested I add a configure option for the damage. After reading up about the API I added the feature and tested it out, it worked great. However, after uploading it to the workshop, downloading it from there and enabling it, it fails to do any damage. I've looked through the log, changed the damage in the configuration and everything but the Steam Workshop version just refuses to do damage. After testing a bit I've found that Wigfrid still gets the health and sanity buffs while hitting anything but just no damage. Can someone help me figure out how to fix this please? Let me know what other information I need to give you. I've attached the uncompiled version.Machete.zip Edited July 27, 2015 by MystPhysX Link to comment Share on other sites More sharing options...
MystPhysX Posted July 26, 2015 Author Share Posted July 26, 2015 Okay so I solved it. Instead of calling a new local variable in machete.lua (wdamage). I decided to call the variable in modmain.lua. The changes are as follows: modmain.lua + GLOBAL.TUNING.MACHETEDMG = GetModConfigData("wpn_dmg") machete.lua - local wdamage = GetModConfigData("wpn_dmg", "Machete")- inst.components.weapon:SetDamage(wdamage)+ inst.components.weapon:SetDamage(TUNING.MACHETEDMG) I did the same for weapon durability and now everything works great. 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