How to add a delay in a function?

Hello, I wanted to know how add a delay node in a function. Thanks for the help!

Those with the clock icon on the node are latent function that take certain time to complete, and can’t be use in a function.

You will have to create your delay in the event graph.

A function just can’t have a waiting node because it need to complete in a single execution.

1 Like

A function has a call stack, which means it needs to finish running and returning before anything else can run. (Blueprints do not have coroutines.)
The “delay” node in an Event Graph is syntactic sugar for “set a timer, then call back some event when that timer is done, and continue running some other event” where that “some other event” ends up being the output pin of the “delay” node.
If that’s the action you want to do, you can manually set that up in the function, but beware that the “after delay” action must be an event, or a function. (Set Timer by Event or Set Timer by Function or maybe Create Event from Function followed by Set Timer by Event)

Thank you!

1 Like

Thank you guys!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.