edited December 2022 in ORK Support
Hi,
I used to get exp value before I upgraded to 3.10.0 by this:
int expAtNextLevel = combatant.Class.Current.Development.GetValueAtLevel(combatant, ORK.StatusValues.Get(Constant.GUID_Status_ClassEXP), combatant.Class.Level+1, true, true);

After I upgraded to 3.10.0, the method above was missing, so I tried this:
int expAtNextLevel = 0;
bool result = combatant.Class.Current.GetDevelopmentAtLevel(ref expAtNextLevel, combatant.Class.Level+1, ORK.StatusValues.Get(Constant.GUID_Status_ClassEXP));

but the result is always false and the value is 0.

How can I get the exp value via script?
Post edited by bitmore on
  • Solved. Use
    int expAtNextLevel = combatant.Class.CurrentDevelopment.GetValueAtLevel(combatant, ORK.StatusValues.Get(Constant.GUID_Status_ClassEXP), combatant.Class.Level+1, true, true);
  • Make sure to also do null checks before accessing this, e.g.:
    if(combatant.Class.CurrentDevelopment != null)

    Since the big class system update (ORK 3.7) with class slots, etc., combatants no longer require a class and don't automatically get the default (index 0) class assigned if they don't have any.
    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.