I have the same thing in UE 5.3 and it works normally!
The same delay function in gameplay ability does not work on UE 5.4!
Could anyone tell me if this is a problem in the C code that is the parent of the blueprint or if it was a change in EU 5.4?
Regardless of whether delays were changed for abilities in 5.4 or not, (which I don’t think they did), you should be using the ability delay task (Wait Delay) instead inside abilities, since it actually ends if the ability ends, eliminating potential hard to track issues if the delay ends after the ability has stopped
Thank you for your time and guidance!
I don’t know exactly how “wait delay” works, it has two extra options, “async task” and “On Finish”.
If you could give me an example of how these options work, I would appreciate it!
OnFinish will trigger when the specified time has elapsed (same as Completed on the delay node)
The normal “then” execute pin is just so you can add more nodes after that (so that you don’t have to use a sequence)
The AsyncTask pin is a pointer to the task object itself. You don’t have to care about it unless you want to explicitly cancel the delay later in the ability
You can do that by calling EndTask on the task object, ideally by saving it to a variable and checking if it’s valid before ending
An example:
Say you have a charge spear ability, that on input begins charging your character’s spear for an attack
Say the ability automatically ends after 5 seconds of charging (so you start a delay, and save the task to a variable)
However, should you press the input again (which would be done with the WaitInputPress ability task), then you actually throw the spear. Should that happen, you will want to end the delay task, so that it doesn’t actually end the ability (which you can’t do with a normal delay, you would instead have to use a timer).
So you end the delay, play an animation, spawn the spear and end the ability when the animation is over.