Hello,
I want to show a custom UI bar for the experience. And I want to get these three values:
1) The experience value at the start of current level
2) Current experience value
3) Experience value at which level up will happen

image

What is the best way to get those values?



  • You can get all of that information from the combatant's status value:
    1) GetMinValue function
    2) GetValue function
    3) GetMaxValue function

    E.g.:
    int currentValue = combatant.Status[expID].GetValue();
    expID is the ID/index of the experience, combatant naturally the combatant :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks! I thought they would get me overall max value.
  • The min/max functions of a status value depend on which type it is (and additional settings). For regular Normal type status values, this'll indeed return the overall min/max values, for Consumables it's the max status value's value and for experience that are used for leveling up it's the previous/next level threshold.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.