Binding custom widget variable to another BP's variable?

I have a health bar UI (a custom radial one) and have a health_percentage parameter driving the bar, it’s all working just fine if I call it with an event dispatcher etc but it’s going to be constantly moving ever so slightly (health constantly degenerates over time) so I figured maybe it’s best to see if I can do a straight bind to a variable so it always updates… but binding a custom widget like this doesn’t give me that ‘bind’ pulldown in the designer UI - is there another way to do it?

I essentially want the same functionality that the UMG progress bar has with its ‘bind’ functionality (see this link).

Right now I’ll have to set a repeating event dispatcher every .1 seconds or so, it doesn’t seem very optimized.

Thanks!

Hey, don’t have my project in front of me but I’m essentially calling an event that grabs my health (it’s actually now a time checkpoint type thing instead) variable, but I was wanting a simpler method by my widget always updating depending on a variable updating in another BP without calling the event, like what you can do when binding the UMG progress bar to a variable. It’s just a bit cleaner that’s all. I’m not sure if that is much faster CPU-cycle wise or not, or if it’s too marginal to care about but would just be less clutter.

Basically now I have to push my variable to the widget by calling an event from another BP rather than my widget having a straight connection to another BP’s variable without having to push updates.

I can post something later on but I think we’re talking about the same thing, and it sounds like what I’m doing is the way to do it? If so I can live with it for sure, nothing major, and I guess I was also wanting to make sure I’m not missing any better ways of dealing with it.

Thanks for your help!

Yes this is the best way to do it, this way you optimized your widget because you are not updating it every tick, this is the best option, especially as your UI becomes complex, so you don’t have to do these optimization later, and also is the right logical approach as you are updating it when it is the right time.

Anytime.
And whit the same event you can drive all the others parameters you want to be affected by time: AI, wind directions, weather…
Like a slower tiick.

Cheers!

Hey RumbleMonk!
Take a look at this… they talk about performance… Very interesting!

Ok thanks - at least I know I’m not missing out on some other option. Cheers!

I stumbled on the same problem, and unfortunatley, this cannot be done. You cannot have your custom widget variables have binding, like default widget properties can.

I found the answer here: https://forums.unrealengine.com/unreal-engine/feedback-for-epic/44401-bind-custom-variable-in-umg-widget

Quote:

…no blueprint variables defined in a
UserWidget can have this feature, not
without some really complex
refactoring.