Hi,
My ability has variable which key is Constant.VariablesKey_Ability_SkillMultiplier_ATK, and the variable has different values in ability levels.
How can I get the values in specific level?
I'm trying:
int SkillMultiplier_ATK = m_AbilityShortcut.Variables.GetInt(Constant.VariablesKey_Ability_SkillMultiplier_ATK);
but it doesn't work.
  • You can't - the ability leveling up will use the variable changes of that new level and change the variables on the ability's instance.
    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!
  • How about get the variable init value here?
    abilityvariable

    I'm trying the code below but don't know what to do after getting the FloatValue.
    float SkillMultiplier_ATK = m_AbilityShortcut.Setting.level[i].variableSettings.variableChanges.variable[0].variable.floatValue.xxxxxxxxxx;
  • This is pretty complex to get like this, since this involves many classes that can be of different types and aren't fixed.

    The easiest way would be to create a new variable handler and get the variable changes for a specific level.
    Here's the code to do this (using the player as combatant):

    m_AbilityShortcut.Setting.level[i].variableSettings.variableChanges.SetVariables(
    new DataCall(ORK.Game.ActiveGroup.Leader, handler, m_AbilityShortcut.GetSelectedData()));
    float SkillMultiplier_ATK = handler.GetFloat("yourkey");
    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.