I understand that Blueprint functions can’t invoke latent actions (like Delay or Timeline).
However, I find that I cannot add a Delay to a macro either. (I experience this in both 4.3 and 4.4 preview.)
This page suggests that macros should be able to invoke latent actions like Delay:
Managing complexity in Blueprints - Unreal Engine
And this bug report claims that Delay can be added manually to a macro but cannot be collapsed into one:
[BUG] Cannot collapse latent functions to macros! - Blueprint - Epic Developer Community Forums
These both suggest that macros should be able to include Delays–which is not my experience.
What’s the intended behavior here? I have some non-trivial constructs involving Delays that could be elegantly encapsulated as reusable Macros. (I understand that Macros involving latent behavior would not be eligible for invocation from functions, of course.)
Thank you much!
To partly answer my own question, the answer in this post suggests that latent-actions-in-Macros was explicitly removed sometime around May 2014. I can’t find any documentation that confirms this or that supercedes the now-out-of-date blog post I linked before.
That’s a huge shame. As far as I can tell, there is no way in Blueprint to create a reusable node that has latent behavior. One of the big selling points of Blueprint is that it allows you to create reusable abstractions, not just describe one-off behaviors. AFAICT those abstractions are limited to describing momentary behaviors, though, not behavior-over-time. Is that going to change any time soon?
In the meantime, can I create a reusable node with latent behavior in C++ without modifying the engine itself? Are there any examples of C++ Unreal projects that introduce new Blueprint-node-types with latent behavior? I’m happy to code in C++ but I’d like to avoid modifying the engine itself if I can.
Thank you much!
I´ve got a working Delay-node in my macro (UE4.3)
Thank you for your reply. Is that a macro in an actor blueprint, a level blueprint, a macro library, or some other context?
When I right-click in a macro’s graph, Delay is nowhere in the completions. When I try to collapse a graph into a macro, it refuses and the message log includes a statement like “Macros cannot have latent functions (“Delay”)”–or some similar error message. So Delay is pretty clearly prohibited in some macros. I’ll be thrilled to learn which macros can contain a Delay.
Sorry for the late reply. It´s a Macro Library and i use this macro in Actor Blueprints.
Delay node is unavailable in Macro libraries derived from Object and is available in ones derived from Actor
Thank you. Just what I needed to know