edited September 2017 in ORK Support
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.

Thanks a lot
Post edited by UserName on
  • In battle events used by the ability, the ability is already stored as selected data with the action selected key. Same goes for formulas called by the ability (or battle events of the ability).
    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!
  • edited September 2017
    Thanks for the answer. The selected ability doesn't seem to work and I think I know why : the ability calls an event that calls an event that calls an event... that calls the formula. They have share variables checked but still doesnt work. So I'll stick to my workaround for now.
    Post edited by UserName on
  • edited September 2017
    You have to enable Share Selected Data in the node calling the event, since the action info is stored in selected data :)
    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!
  • Yeah I did that, still doesn't work. But don't bother I'll live with the workaround for now, not that big of a deal, since it's just one additional battle event per ability.
Sign In or Register to comment.