Opportunity Attacks
Feature subject to changes
Right now this framework is very component-based and it's being migrated to an ability design in the next (July) update. Those changes won't be backwards compatible and might affect your current implementation.
Opportunity attacks are very common in multiple genres. It's common to see Stealth Takedowns, Backstabs, Parry and Riposte, Finishers, Environmental Attacks in many different games.
The Opportunity System provides a foundation to create such attacks and also provides a base implementation for some of them, with the expectation of more being added over time.
Opportunity Framework
Summary: Opportunity Framework
- Represented by the
NinjaCombatOpportunityManagerComponent
andCombatOpportunityManagerInterface
. - Opportunities are triggered from any source, to an opportunity instigator.
- Opportunity Attacks are represented by two Abilities:
CombatAbility_OpportunityAttack
andCombatAbility_OpportunityReaction
- Animations can broadcast events back to the Attack via
AnimNotify_OpportunityDamage
andNinjaCombatOpportunityEvent
.
Same as other parts of the Combat System, the Opportunity Framework starts with its API defined by an Interface,
in this case, CombatOpportunityManagerInterface
. This interface is implemented by the NinjaCombatOpportunityManagerComponent
which should be added to combatants that can perform and receive opportunity attacks. As usual the CombatSystemInterface
should be implemented in your characters, making sure that the proper component is provided from the GetOpportunityManagerComponent
function.