Hello everyone. In the game that I am currently working on, I have multiple characters at once. I need a way to get those characters health in a Widgit for the healthbars. The problem is that they are different classes, so I don’t know what to do. I can’t spawn the widgit, because there are multiple characters. Please help.
If I understood you right, you want to access the health variable of all character to show it in a widget with a healthbar or?
My recommendation:
-
You can access the health of different classes with the “cast to (class name)” node
-
Open the level blueprint
-
Create the widget in the level blueprint, so that every class can see it (It is now independend from a class)
Let me know if you need a more detailed explanation.