Hey All.
i’m creating a 2d beat em up and have hit a snag with the creation of the Hud
I figured i would essentially create two widgets.
*1 that holds the player information
*2 a widget which is more of a border type ordeal but adds and removes the 1st widget as players drop in and out
Any Help would be much appreciated and probably help me from tearing my hair out and going bald by 33
Are you already familiar with create widget and add to viewport nodes?
By the way, if there is more blood in your head that inevitably happens, when you think a lot, your hair becomes stronger))
yes i’m already familiar with creating widgets and adding them to viewport
i’m more so asking how to dynamically add widgets to widgets
so similar to an inventory system adding buttons as you pick up items i want to add widgets as players join.
Ok so Progress…
I created two widgets. A Widget of Holding called HudBorder With a HorizontalBox and One which houses Player Info called PlayerHud
Inside the HudBorder i created a function called AddPlayer
AddPlayer Creates a PlayerHud Widget and adds as a child to HorizontalBox
Then in my GameMode after my player join funtionality i get all Hudborder widgets and cast to it running the AddPlayer Funtion
So far that works for adding Widgets Dynamically to the HudBorder.
next is to remove them when player removes.