Tasks
Tasks are the building blocks of an Ability. Below you can find a links to all the currently available Tasks. Tasks are continually added/refined based on feedback, so if you think you have a good idea for a Task that could apply to a wide variety of games, or wish to see a specific feature in a currently existing Task, please leave us some feedback.
Comments
Cancel Ability will cancel any Ability (Passive or Active) on the Task Targets that fit the Ability you tell it to cancel, or that matches the Tags you define in the Task. You can turn on the "Verbose" option to see what Ability it cancels on which Actor. Are you sure you're on the latest version? I haven't had any bug reports on Cancel Ability in quite some time, but I'll investigate things just to be sure.
For canceling an Ability in response to movement, you could simply make add an Custom Conditional (which simply calls "Check Custom Channel Conditional" on the Ability Blueprint) and check if your movement axis values are pass some threshold.
Hey, this is exactly what I'm doing. I am using a custom channel condition, the only problem is the ability isn't exactly canceled.
I mean it sorta gets canceled partially. As I can start using another ability after the cancel, but my ability doesn't get "OnInterruted" event nor does the animation cancel. It kinda keeps playing till the end even when the flag "stop animation on intrerrupt" is checked in "Play Animation" task.
You need to make sure you set the “Failed Channel Result” to Interrupted. Other than that, you should definitely be seeing the Interrupted event being called. Also, make sure you’re using the Ability Animation Node mode for the Play Animation task. It should work for the other modes, but dynamic montage tends to be iffy in the best cases.
The problem is I am using everything the way you described it :/.
I'll try providing more details when I'm back at work.
Can I created my own tasks?
Yes. Either through Blueprints using the “Custom Task”, or through C++ by inheriting from the base UAblAbilityTask class.
I use task inherit。but build ue4 package show this error。Graph is linked to private object(s) in an external package.
External Object(s):
AblPlayAnimationTask_0
KxBuffAbleTask_0
AblCustomEventTask_0
That’s a very old error. You can try turning on “Copy Inherited Tasks” in the Able options.
I have few questions.
The task "Cancel ability" isn't documented here, nor does it seem to work.
Looking into the source code it seems that so far it is only able to cancel the ability in which the task is called, even tho is looks like it should cancel ALL abilities with provided gamepaly tag on context instigator/owner. (the actor running the component)
Also, so far what I am trying to achieve is to basically make a melee attack combat animation, played by an ability, to cancel out entirely after a certain point in animation if the player is providing any movement input