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
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.
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!
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
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 :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!