Gameplay Ability Implementations
The system comes with a several ability types implemented:
Instant Ability
Applies its effects to target immediately
Toggle Ability
Applies its effects to target immediately, and upon retrying to activate, removes the effects previously applied
Passive Ability
Effects are always applied to owner when the ability is granted. Applied effects are removed when ability is Ungranted.
Projectile Ability
Instantiates a prefab/gameObject and propels it forward. The instantiated gameObject applies the effects on collision.
Targeted Projectile Ability
Instantiates a prefab/gameObject and assigns a target to it. The instantiated gameObject will move towards the target and apply the effects on collision.
Trigger Ability
Applies its effects whenever triggered by a tag on its owner. The trigger can be tags added/removed from a duration effect or instant tags from an instant effect.
Animation Ability WIP
An ability that plays an animation and apply its effects in certain frames of that animation. This class can/should be tweaked for your specific game needs. You must mark AnimationEvents on the animation. Also, the animation uses Animator trigger to start the animation. This is similar to AbilityTask in UGAS. The ability starts and awaits for an stimuli to apply the effects. To use it: 1. Setup the Animator - Put an Animator component in the same GameObject as the ASC. - Put the AnimatorController with your choosen animation in the Animator component. - Put the AnimationAbilityListener on the same GameObject. 2. Add the AnimationEvent to the ability you want to trigger effects, choose AnimationAbilityListener's AnimationAbilityTrigger(GameplayTag) method and set a GameplayTag. 3. Add the GameplayTag and the GameplayEffectSO to the AbilityAnimation's animationEffects. 4. Done. Whenever the animation triggers that gameplaytag, their associated effects will be applied. The approach that allows easier numeric control for DPS balancing, is to put a cooldown bigger than the animation playback time, regardless of how long it takes to play the animation. This allows balancing to happen in terms of how many times it can be activated in a given time, rather than how much damage each effect triggering must do. If you want to add effects while the player is using an animation (e.g. Soulslike isSwinging / isParrying / isBlocking), you can apply the effects to the owner when the ability activates and remove it if the ability is cancelled (cancelling the ability externally also stops the animation)
Last updated