I want to deal multiple instances of damage to an enemy during an attack animation through the use of animation events. The animation is pretty long and has multiple strikes where each time a function is called that utilizes AbilityShortcut.Use(). The battle-system is turn-based.
I use the following code to trigger this but the AbilityShortcut.Use() is returning false and thus doing nothing. The variable combatant is the attacker while combatantList is the list of enemies that should be dealt damage. Both are not null. The code is executed while the schematic of the attack is active.
AbilityShortcut ability = combatant.Abilities.Get(ORK.Abilities.Get(currentAbilityId));
if (ability != null)
{
ability.Use(combatant, combatantList, false)
}
I'm probably missing something here. I assume the ability can't be used by the combatant in that moment for some reason.