edited June 2017 in ORK Support
I have been pulling my hair over this one and dont seem to find the bug.
I have set a variable with my attack abilities called "weaponDmg" like so
image

And now I try to use the variable in the formula like this
image

But I keep getting 0 and no error or exception.....

EDIT:
After extensive testing I can see that no variables work in my formulas, even though I switch the keys back and forth.
Post edited by pesi83 on
  • edited June 2017
    i could be wrong, but i think that this is the same problem that i encountered recently (HERE)

    if you try and use combatant based variable data when testing a formula in the editor then it will always return 0, as per Gil's explanation: "That's simply due to the fact that testing in the editor doesn't have a game object for the combatant, i.e. no object variables :) ". in other words Ork doesn't just go off and get the variable data from the combatant screen, as you might expect

    although it returns 0 when running a calculation in the editor the formula should work correctly during gameplay. however, depending on the complexity of the formula and the game conditions in which it's used, that may prove to be quite hard to verify

    Post edited by HarryOminous on
  • Thanks Harry, but I am actually testing in-game. I set a variable on an ability, and call the variable "damage", than I create a formula to calculate the damage, the formula simply returns the varaible "damage" from the selected object with key "action". I always get 0 from the formula. So I believe there is some issue with ability variables being available in formulas that calculate damage and to-hit chances.
  • edited June 2017
    Make sure you use the Selected variable origin and set the selected key to action (which will be automatically set as the ability variable when called from an ability or battle event used by the ability.

    Also, make sure you use the Value value type when defining keys, not Game Variable.

    Can't see the pictures, so all I can do is guess :)
    Post edited by gamingislove on
    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.