Create Abilities
Last updated
Last updated
To create Abilities you need to create a new DataEntity
that derives from AbilityBase
. In Prodigy there are several of these already that are hopefully fairly generic and you can use them for a few similar Abilities with nothing more than VFX and property changes.
If you need some custom behavior in a unique ability that the default classes don't provide - just make your own! It's not difficult, just derive from the class you want (like AbilityBase
) and implement what you want to happen by overriding the abstract class methods. The AgentAbilities
component in the game will be calling those methods as needed, so you just have to fill them with behavior.
The headers for the variables are helpers to indicate when those variables are relevant. Basic info includes cooldowns and channeling information. When you get either OnBegin or OnUse called you can fire VFX, use any number of AnimatorOperation
.
OnBegin is for when the Agent begin's the ability. Channeling fx would start in "begin".
OnUse is for when the ability 'occurs'. This is generally the time when you apply damage and effects or forces. This typically gets called back from the Animator which has a component in the Ability state that lets the Agent know when the correct time to 'Use' the ability is. It's the same sort of arrangement used in Melee weapons.
If a cast time is zero, then both of these will fire simultaneously. This arrangement gives you enough control to do most things.