I'm trying to figure out how to get my unit's xp as a percentage or a decimal so that I can make my xp bar work. I have this to figure it out:
Unit XP Current / Unit XP Default
However, sc2 seems to think that I'm trying to divide the unit's current XP by 0, not the required XP. Does anyone have any ideas as to how I could get this to work?
not sure if you can get the value directly off the units. But you should be able to do a "get catalog field value" from the veterancy behaviors. Or just preset an array to know the value of xp required for each level.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
To post a comment, please login or register a new account.
I'm trying to figure out how to get my unit's xp as a percentage or a decimal so that I can make my xp bar work. I have this to figure it out: Unit XP Current / Unit XP Default However, sc2 seems to think that I'm trying to divide the unit's current XP by 0, not the required XP. Does anyone have any ideas as to how I could get this to work?
not sure if you can get the value directly off the units. But you should be able to do a "get catalog field value" from the veterancy behaviors. Or just preset an array to know the value of xp required for each level.