Why won't my hud update?

I am trying to update my hud without using the bind function because it works on tick.
I made an actor blueprint that has nothing it it except math to create a clock called DayNightCycle.

The hud widget blueprint looks like this

any help would be appreciated

How are you setting DayNightRef? Does the cast fails? I’m pretty sure it does. Put a print to check if the cast succeds or fails.

You’ve set the timer for “Countdown” function. Where is it?
Also, the note in the cast in your second image probably says the NightDayRef is already of type DayNightCycle. You don’t have to cast.

if i dont have something in the cast object slot it errors. this is the countdown function

I created a new variable in the hud as an object reference to the daynightcycle. You’re right it does fail. Is the only option a get all actors of class node?

Is there more than 1 daynightcycle object in the scene? If not, then sure, you can use get all actors (index 0) of class daynightcycle.

I would prefer setting the reference as soon the widget is created and added to the viewport, but, it’s ok.

As I see it, the UpdateUI never gets called and so the MyCustomEvent that is bound to it never gets called. You could try putting it in Countdown function. And TimerToText setter in countdown too. That might work.

there is only one. Not sure by what you mean to set it

To give it a value. DayNightRef must hold a reference to an existing DayNightCycle object, otherwise it’s null.