Show variables in HUD


I am looking for a solution for a simple problem - well, I guess it is simple.
But I can’t figure it out myself, as the concept of graphical scripting is very new to me.

I have my player pawn, which is a vehicle. That vehicle owns a variable, which is a counter for something.
And I have a widget blueprint to show some values in a hud

One of the values, that I want to see, is that counter, which is a variable of the vehicle.
But I have no idea, how to cast that variable to the widget and display it.

Does anyone a hint for me, please?

Hey, one way to do this is to have a reference of your vehicle inside the hud and bind a text block to it. You have many ways to set the reference of the vehicle, if it is your player controller’s pawn you can call OwningPlayer inside the UMG Widget and then get the pawn and you should see the variable.