Use Timeline in HUD BP?


I have a problem in HUD BP.

I want to animate some HUD elements with Timelines.
So I start Timeline in Event Draw HUD, and draw HUD elements after that, but editor says:
“Warning My_HUD_C_0 Canvas Draw functions may only be called during the handling of the DrawHUD event” and HUD not rendered.

If I remove Timelines from flow, everything works fine and that warning not appears.

Any advice?

I think you can’t use timeline in HUD BP because EventDrawHud needs to be really fast to return.(probably in some other event, just not EventDrawHud)
If you want to animate something in hud’s shader, use a state variable from your pawn and then use dynaimc material to get that variable.

Fixed through custom events.
I call events in Draw HUD, and start Timelines from them.

Thanks for the answer and the workaround. I had the same issue with Delay node.

I could not get Delay to work though even with Custom Events. Can you describe a bit more specific how did you achieve that?

I know this is old, but I found that if I call my draw functions BEFORE the timer they work just fine. However, I get the error if I try to have them called after the timer. So basically everything has to go into variables and the timer sets the variables.