I am getting crazy and can’t hold myself calm because if this very awful problem!:(
SO my problem iis with BGMC!& game project XP system.
I do thiks:
import bge
from bge import logic
def levels(cont):
own = cont.owner
xp = own["XP"]
level = 1
while xp > 9:
xp /= 2
level += 1
own["Level"] = level
xpNeed = 0
You can see my equation for the level setting. It slowly reduces XP till it gets below XP required for level 2. And I get level as resulting. Now I need to do som kind of iknverse on the xpNEed variable so that I can get the xp needed for next level. How do I do it?