A. Adding New Ability
Ability is same as skill, you could create many behaviour as you want, the ability can also apply some gameplay effect, require cost, apply cooldown, etc. I've also add some sample in AgateGASExample for something like Directional Attack, etc.
You can read more about Ability here.
- Create a Blueprint Class derived from AGASGameplayAbility.
- For example, we will create GA_AttackSelf (looks dumb but we should choose an easy ability XD).
- On the Class Defaults, you will also see Agate GAS section.
- Ability Input ID: is used to be identifier as the input (passive skill should not required this, leave it to None), not bound to Input directly, but you can set in manually.
- Activate on Granted: which means the ability will automatically run when its granted to the character, as like passive skill.
- Cost Multiplier: is used to multiply the Cost value in Gameplay Effect, will explained more later.
- Cooldown Duration: is used to be as cooldown duration.
- Cooldown Tags: is unique tag that ability has for cooldown marker, you can make it unique if you want the cooldown is in every skill, but you can also make it based on the skill slot, whatever you need.
- Effect Containers: is used to be Gameplay Effect, that make you easily to group the GE, such as when you need to apply GE to enemy, you just group it to enemy effect container, and apply it in Blueprint just by their tag.
- For now, let's just assign the Ability Input ID as Attack.
- And then go to the Blueprint, let's just create some nodes like this:
There are much event other than Activate Ability, but we just need to use this for now, it will executed whenever the ability activated, Commit Ability is required to verify whether the cooldown or cost are enough, you can also separate Commit for Cost and Cooldown by using another separated function. This will show Attack Executed whenever we execute the ability.
Don't forget to also End Ability at the end of any possible sequence, otherwise you can't used that ability again.
No Comments