How to use tables to rank up my players level
What I'm trying to have happen is that, once the enemy is destroyed how every many XP points are do by destroying that enemy, I want It to add them to my XP bar and once the bar is full to level up and then restart the bar over, (With it increasing the XP needed for next level). My bar just keeping running forever and it never levels up. I've been using the XP Meter video and the Exp bar template as a guide, that are given in some forums but they seem to be incomplete.
Please, any Info would be greatly appreciated!
Best Answers
-
klickink Posts: 35
@TRowe007 so I'm not sure what to say because I don't know how you have it set up? So I will walk through kind of a generic model of an XP bar and let me know if that's what you set up. You have an image (bar) that is constrained to an attribute. When enemy dies XP rewarded. When XP > level criteria. Level = level + 1. Then this is where it gets tricky if your bar goes back to 0 change XP = 0 but if you are just compounding the XP then you will have to change the constrained attribute so for example if level 2 = 1000XP and you are at 990XP and then get 25XP your XP =1015 and if level = 2 constrain image (bar) to a new variable (level 3) which could be 2000 so at 1000, bar = 0 so at 1015XP it might as well be 15XP and you will have to make constraints on each level increase. However if you are doing the change back to 0 XP on every level up (which might be easier) you can always display a different number that adds all your XP together so the user will get the impression that they are compounding XP and either way you will need to redefine the constraints if it's take more XP for a higher level then the first level up. Sorry if any of what I said wasn't clear.
-
klickink Posts: 35
@TRowe007 one thing I forgot to mention if you are using the two variable (attribute) method, using a compounding variable and a constrained variable there is a third variable you might want to add. A placeholder, this number will basically be set up with a rule that says when the constrained variable > level criteria. Level = level+1 and constrained variable=0, but before you set constrained variable=0 set the placeholder variable to constrained variable-level criteria. Then you add placeholder variable to the constrained variable after it is set back to 0. Basically level 2 = 1000XP and you are at 990XP and then get 25XP your XP =1015, this allows you to add the 15XP after the level up.
Answers
Yes, thank you