Jump to content

Need Help With Variable Save


Recommended Posts

Hey everyone,

I'm trying to make a character mod wiith a custom axe. The axes damage increases over time, which I achieved this by setting a onattack fn. So the problem is when I exit the game and re-enter the server, axes damage resets. I looked for any similar topics but no luck so far, I couldn't undertand what I've found.

There is global variable in modmain, axes damage set to it. This is the variable that changes over time (the code for this in axes prefab). So, how can I save this variables last state when game save or I exit the server?

Thanks for the help

modmain.lua

dargoaxe.lua

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...