Having Problems with "Get user widget object" and casting

I’m trying to give my player characters health bar that appear over their heads, so I made a new user widget (called Health_Bar) and gave the parent character bp a widget which I set to have a widget class of Health_Bar
image
image
The problem occurs when I try to get the user widget object and cast it to the Health_Bar class, because the cast always fails.


I think I may be misunderstanding something about the get user widget object or something about the widget classes themselves.
Are there any obvious issues in my process?
Thanks :grinning:

Hey @Sorasuckz ! Welcome to the forums!

I don’t think that cast can run as is. The cast is set as a Pure cast, and I don’t think that will work here. So click on that cast, go to the details panel (right hand side by default) and uncheck “Pure”. Hook it into the execution line and let er rip! :slight_smile: Let us know how it goes!

That seems to have done the trick, thanks

1 Like