In my game, each weapon has a different range. For instance, a spear has longer reach than a sword, but might have a longer minimum reach, because it's awkward in close quarters. So to do this, I thought I would simply add a range game variable to my weapon, then use one formula to determine ranges of attack of all weapons in the game.
Problem is, the minimum and maximum ranges of abilities can't be dependent on a formula/variable. In Ork battle range templates and custom ranges in abilities, I can only input a defined value for minimum and maximum ranges.
So I created a workaround : Instead of using a formula, I created abilities for every range possible and every type of attacks... so for instance, abilities thrust range 1, thrust range 2, etc. And they just use the corresponding range templates. Worked OK until I ran into some problems.
I'm trying to do this : when you attack a target, the game checks which ability you used, and based on it, it does different things. So I thought I would just use a select ability node, then create a game variable fork node to check which ability was used. But when I use a select ability node, I can only choose a specific ability of a combatant, and I don't see how to select the ability that was used.
So I thought of another workaround: create a battle event that sets a game variable for each ability, put it in the animation sequence of abilities, then use the game var in my game var fork instead, which works.
I intend to have maybe a hundred abilities, and it will get seriously cluttered, and overly complex. So I was wondering how can I set the battle ranges based on a formula instead of a value, where can I code that? If I can just do that, I can scrap all my workarounds and save a ton of headaches, because then I can simply use the base attack and do everything from there without creating abilities.