Download

Updating widget values with float values from separate blueprint

So I made a time of day system with blueprints, and I’m trying to hook it up to a day counter that will display using a widget blueprint that’s drawn on screen by my thirdpersoncharacterbp on eventbeginplay.

Using a looping timeline, things like sun rotation, intensity, etc are controlled. However, on each completion of the timeline loop (at midnight or 0 hour each day) I want to add 1 to a counter that will feed to my widget blueprint, so that each day, the day counter number will have gone up by one.

At 7am, I want to use a float value to fade in the opacity of the day counter text in my widget blueprint, only for a few seconds, and then fade it back out. So pretty much all day and all night, the day counter isn’t visible, but at around 7am, or around sunrise, it’ll fade in, display for a few seconds, then fade back out.

The problem that I’m having is getting my widget BP to pull the float value set by my time of day system, I have no idea how to do this.

If you can get a reference to you Day/Night in the WBP itself you can just Bind a Text component to the particular property your after. As the property changes, the Text will update itself.

I’m referencing it using a variable calling an instance of my time of day bp, and at runtime the float I want to reference is changing in that bp, but not in the widget bp. Is it maybe referencing the wrong instance? If so how would I get it to reference the right one?

Trying to cast to the HUD widget, but having some problems.

So if I don’t have anything plugged into the object, I get this message:

and if I have either the reference or the reference parent plugged into the object, I get this message:

The inrange float value is the time (0-2400) float value, so it needs to be be between 699 and 701 (or 700) for the day counter fade timeline to fire, from there it’ll update the day counter opacity float value from zero to one to zero:

which is what my widget text opacity should be referencing:

but it doesn’t update. Something isn’t communicating somewhere :confused: