Why my blueprint communication with HUD is not working?

I have a HUD in which I created a custom event like this:

78066-sin+título.png

And I’m trying to access that custom event from a level blueprint like this:

78067-sin+título.png

But communication never happens. The breakpoint at CalculateTimer never happens…

What I’m doing wrong?

Firstly add an IsValid from the Event Tick and plug your HUD Reference in chances are it is not valid so not ever setting the event off.

From the Level Blueprint, You could try getting the PlayerController and get HUD do a pure cast to your HUD class then execute this event.

If something you are referencing doesn’t act as desired always add an IsValid and set a print string to if not valid or is valid to debug better.

When I get playercontroller and get the HUD, the references don’t match… It says “HUD Reference is not compatible with HUD reference”… And I don’t understand your IsValid thing…

I am not on my machine but I will show the workflow below with words,

Is your ‘HUD Reference’ variable a widget or a HUD? What Type of Variable is it?

If its a HUD then just get PlayerController > Get HUD > Cast to NameofHUD and then from the cast node drag out the blueline and type Calculate Timer

Then there is no need to use the HUD Reference variable.

Cast to & IsValid are both Blueprint nodes FYI.

My ‘HUD Reference’ is a Widget Blueprint… :frowning:
(Same as my HUD…)

Ohh I thought you were using the HUD Blueprint as in the HUD you define in the GameMode.

Try using an event dispatcher in the level blueprint. The example below is a reverse of what you want to do but the same principles apply.

Finally I could solve it like this:

I had to set the delta time in another variable, or I would be considering the Delta difference always, and it will be always 0 when Truncating… And actually the way I was getting the HUD reference was incorrect. This worked like a charm!