• Advertisement
Sign in to follow this  

Levels and Exp in Lua

Recommended Posts

I'm having trouble with getting an extremely simple leveling system scripted in lua. I'm probably just over thinking it. I'm trying ro get it to make the main character to level when he hits x amount of exp and did so by checking if the current exp is greater than the exp needed to level, then add 1 to level, increase hp by 1.5 times, increase damage by 1, subtract the exp needed from the current exp, and multiply the exp needed by 1.5 times. I might be placing it in the wrong place or just doing it completely wrong altogether. Either way, any input is greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement

It's kind of hard to answer to this. The way you describe it, it sounds like a reasonable way to level up, given that we know nothing about how do you want your level system to work. It's not really clear what you are asking.

Are you having trouble implementing the level system you described? Then post the relevant code and state what behaviour you are expecting and what behaviour you are getting. If your code is throwing errors, it would be useful to know so.

Share this post


Link to post
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

Sign in to follow this  

  • Advertisement