Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Why can't I add a Delay Node to a function?

This relates to Unreal Engine 4.1.0 via the Launcher.

I can add Delay Nodes to any Event Graph, even the Animation Blueprint. I can not however add it to construction scripts and functions used in the Event Graph.

Reproduce (using both right click and D-shortcut):

  1. Create any Blueprint.

  2. Open Event Graph.

  3. Add Delay Node. OK

  4. Add Function.

  5. Try add Delay node inside Function. NOT OK

Is this a limitation by design or a bug? I find it odd that delay nodes doesn't work inside functions while timers do. I've tried searching the AnswerHub, and the documentation, but I can't find any information about this.

I'm just thinking that there could be situations where you could have a behavior with delays that you may want to reuse as part of a function. For example, function does: Do X, wait, then Y.

If it is by design I would appreciate a basic rundown of the technical aspects to better understand how Blueprint is structured. Thank you!

Product Version: Not Selected
more ▼

asked May 27 '14 at 05:17 PM in Blueprint Scripting

avatar image

1.1k 29 35 71

avatar image M.FatihSaglam Jun 16 '18 at 12:30 PM

I recreated ForEachLoop macro in to a collapsed node by looking at sidebyside screens, it worked. I'm trying to create a slideshow to background. In the image below, you should check carefully where I put delay function.

alt text

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

6 answers: sort voted first

Hey Denny,

This is a limitation by design. In a function or macro, you can not have a latent node or anything that takes time, like timelines and delays. We have attempted to implement delay and timelines into functions and macros before, but it is only causing other issues to arise. This may be reopened and looked into at a later time.

Thanks and have a great day!

more ▼

answered May 27 '14 at 05:51 PM

avatar image

[Epic] Gribbs ♦♦ STAFF
11.8k 292 14 77

avatar image Denny May 27 '14 at 06:51 PM

Thank you Sean.

avatar image jfaztk Mar 25 '15 at 04:32 PM

This feature would be really appreciated...

avatar image [Epic] Gribbs ♦♦ STAFF Mar 25 '15 at 04:38 PM

Howdy paragonx,

I will be sure to bring this up the blueprint devs and see if there have been any further discussions, though this is working as intended.


avatar image alperenakyuz Mar 25 '15 at 06:54 PM

Instead of functions, you can just use collapsed nodes with inputs/outputs and delays.

avatar image Sentient Mar 28 '15 at 08:39 PM

Would this also be why MoveComponentTo isn't available in a function? I just ran into this and was wondering what why I couldn't find it..

avatar image Arthur Khusnutdinov Jun 18 '15 at 08:52 AM

When it will be implemented?

avatar image [Epic] Gribbs ♦♦ STAFF Jun 18 '15 at 07:19 PM

Howdy Arthur,

Thank you for responding to this issue. I reached for additional information and here is a bit of the information that I got back:

This feature is a design constraint that will not be changed. The reason is that functions have return values, and can be called from native code. Because things can be relying on the return value of a function, we don't want to break the game thread waiting for that code to finish delaying.

Event Graph has shared state, and is re-entrant. That allows a degree of flexibility, because we're saying nothing depends on the result of anything. That's why events don't have return values, and allow for delays and other latent functions.

In short, the contract is: if you have a return value, then someone is depending on your code to return as fast as possible, so no delays. If you're an event, you don't have a return value, so you're free to do what you want.

Thanks and have a great day!

avatar image Spaz Killington Jun 30 '18 at 08:57 PM

Why not just add a concept of private functions that are meant to be used by the current graph only? The functions are nice because you don't have to create massive graphs. Coming from a programming background (and someone how has always used Visual Studio), I find these massive graphs to be clumsy.

avatar image trepid_jon Dec 10 '15 at 04:32 PM

It seems pretty feasible to let people call an output-less delayed node in a function or macro if it's an issue of not wanting to let a function or macro wait for the delay / break the timeline. Or add special rules to the outputs so they can't be part of the default return, like color the output wires different than white and/or with dashes or something...or ideally make them have depth since that's what's really going on with the timeline at that point.

The issue stems from too many systems and features (and people) thinking flat and "2D" instead of having "3D" / an extra depth in mind. Imagine Blueprints in 3D, and if you break from the default flat timeline then it's popped front or back, and could be visualized as such easily thanks to it already being in 3D. I have a theory that when the majority of our workstations transition to VR and AR and holograms and more software / OSes are VR-ready (aka 3D), everything and everyone will start thinking with 3D in mind and limits like no delays in functions/macros will vanish. Then you stop limiting yourself to 3D and it gets even wilder.

"Now you are thinking with portals."

avatar image HitEmUp Apr 09 '17 at 11:45 AM

Still no news on this?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

i have a solution to open a fonction after delay in an other function , that what i were searching for set timer by function name with loop=false alt text

sans titre.png (316.6 kB)
more ▼

answered Jun 16 '16 at 02:31 PM

avatar image

BRS Office
1 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

native Loops also don't have the option to lose delay or time operations between loop cycles. i have made a macro library of alternative loops that do have option for delay, if enough people here are interested i will submit it to marketplace for free later on. let me know :P

more ▼

answered Apr 09 '17 at 01:22 PM

avatar image

925 20 44 64

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You can break the function into two functions. Where you're currently calling the function (for instance from a trigger), Call function 1. Call Delay. Call function 2. Make sure the delay includes execution time for function 1. Works for me.

more ▼

answered May 05 '17 at 03:48 PM

avatar image

11 3 4 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

One solution I found for my case was to call a custom event which held the delay node. The problem with this, of course, is that the rest of the function will not wait, but this is a muzzle flash in my case so that is irrelevant.

[1]: /storage/temp/138788-dealy.jpg

dealy.jpg (422.9 kB)
more ▼

answered May 23 '17 at 12:40 AM

avatar image

1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Here is a another simple solution for delay in function: Lets say you want to switch between 2 cameras every 5 seconds. In event graph add SetTimerByFunction, Create 2 functions (State1 and State2). In each State Function add Sequence (as HitEmUp posted). In Sequence in pin 1 add what to do and pin 2 add SetTimerByFunction calling opposite Function (state) with delay of 5 seconds. Back on Event Graph. In SetTimerByFunction call State 1 function and mark Looping.

more ▼

answered Aug 14 '17 at 08:16 PM

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question