edited June 3 in ORK Scripting
Hello!

I have a basic attack ability, that reduces a "Hit Point" status value on the target, based on the result of a "Damage" formula (it always hits).

The ability also has an int Ability Variable, "statAttackModifier", that is referenced in the Damage formula.

If I set the statAttackModifier variable to be a fixed value, everything works perfectly. However, if I set the statAttackModifier to be another Status Value of the current User, then I get some weird behavior. Sometimes it will return the Status Value as expected, sometimes it will just return a value of zero. Is there a bug here, or am I setting something up incorrectly? Screen grab of the Ability Variable setup below.

Thx!

image
Post edited by StevieJay on
  • Use the user's status value directly in the formula instead.

    Ability variables are set when that instance of the ability is created (e.g. a combatant learning the ability) or when it's leveled up to that level. It also uses the player combatant for any combatant-based changes (as it doesn't know who it belongs to).
    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!
  • The issue there is that each ability can use a different status value. I wanted to be able to use just a single formula, and set the status value to be used on the ability.

    Is there another straight forward way to do that, or I just have to make a variant formula for each different status value used in the abilities?
  • Best way is to use separate formulas for this, it's easier to just select a different formula in the ability instead of having to set up the ability variables. It also reduces some complexity (e.g. having to deal with selected data in formulas) and reduces memory use and save game size (in case the ability doesn't use variables without this).

    If you want to use ability variables for this, you can just assign values and check for them, using a different status value in the formula. E.g. 0 being STR, 1 being AGI, etc.
    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!
  • Okay, cool - thx for the quick replies!
Sign In or Register to comment.