By default, Gameplay Abilities do not support ticking, and this is done by design and intention. However, there may be abilities that require tick functionality, and this Ability Task handles just that.
Assumptions are that you have added GAS to your project and know C++/Blueprint programming.
" * Gameplay Abilities do not carry out their primary work in a “tick” function like Actors and Components do. Instead, they launch Ability Tasks during activation which do most of the work asynchronously, and then handle the output of those Tasks by hooking into Delegates (in C++) or connecting nodes to output execution pins (in Blueprints)."
Hi, one comment: you should call the UAbilityTask::ShouldBroadcastAbilityTaskDelegates function before broadcasting your delegate, so the tick function should look more like this:
You’re welcome! And, oh, I have a few more comments actually
The TaskDeltaTime variable from the header file looks redundant.
Also, the TaskInstanceName parameter from the UHeroAbilityTask_OnTick::AbilityTaskOnTick does nothing, because you’re not using it. That function should look more like this: