Hello -

I'm integrating the ORK battle system into some custom code I have. I want to be able to execute multiple Abilities in the same code block. For example this works:

combatants[0].Abilities.GetCurrentBaseAttack().Use(combatants[0], new List<Combatant> { combatants[1] }, true);
combatants[0].Battle.EndTurnCommand(true);
and this works:

combatants[0].Abilities.Get(ORK.Abilities.Get(1)).Use(combatants[0], new List<Combatant> { combatants[0] }, true);
combatants[0].Battle.EndTurnCommand(true);
but this only executes the base attack and not the second ability even though there is available APT to execute the second ability:

combatants[0].Abilities.GetCurrentBaseAttack().Use(combatants[0], new List<Combatant> { combatants[1] }, true);
combatants[0].Abilities.Get(ORK.Abilities.Get(1)).Use(combatants[0], new List<Combatant> { combatants[0] }, true);
combatants[0].Battle.EndTurnCommand(true);
I'm using a phased battle system and tried some various settings such as "Use Dynamic Combat" but it doesn't seem to work.
  • edited May 2022
    The Use function of the ability using the action (passing on true) will still register the action with the system and doesn't allow performing both at the same time. A combatant can only perform one action at a time.
    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!
  • edited May 2022
    Just in case anyone else runs into this problem, I was able to work around this limitation with the following function:
        IEnumerator RunORKAbilities(List<int> turnAbilities)
    {

    for(int i = 0; i < turnAbilities.Count; i++)
    {
    combatants[0].Abilities.Get(ORK.Abilities.Get(turnAbilities[i])).Use(combatants[0], new List<Combatant> { combatants[0], combatants[1] }, true);
    yield return null;

    }
    combatants[0].Battle.EndTurnCommand(true);

    }
    And where I would have called the Abilities, I instead assign the Ability id to the list and then run the coroutine:
    List<int> turnAbilities = new List<int>();
    turnAbilities.Add(0); //Add base attack
    turnAbilities.Add(1); //Add base Ability 1
    StartCoroutine(RunORKAbilities(turnAbilities));
    Post edited by indoflaven on
  • Interesting solution - are your actions animated (using schematics) with any wait times? That should still block the combatant from performing the next action while animating the current one.
    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!
  • Interesting. I'm using Custom Setting animations to animate via a toolkit called Feels. So far I've only animated the attack, damage, and evade animations this way so maybe I'll run into issues when I animate the other abilities. Or maybe not since it's not using schematics, and as far as I can tell the system wouldn't know the animation durations.
  • Yeah, if there are no animation durations, the schematic is over in the same frame it started - unless you add wait times via a Wait node or from other nodes with wait times.
    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.