Variable-driven UMG widget Size
Going Straight to the point. I need to create an Health bar which size depends on the Maximum Health of the player. Dark Souls is a great example of this, the character can have a Stamina Bar Longer than the Health bar if he wishes, by spending points in Stamina. I already made the stats system, i'm now stuck with the health bar problem.
asked Jul 27 '16 at 04:13 PM in Blueprint Scripting
The options for size and such depend on the container panel. I did the same thing you did using a canvas panel. Now, each UMG widget has a Slot which defines its size / location options in its container.
Thus, assuming your health bar is inside a canvas panel, you can drag out of it -> get slot -> cast to canvas panel slot -> set width.
Do this on begin play to initialize it and whenever the player's max health changes.
answered Jul 27 '16 at 04:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here