Well you can easily create an HP bar in a leaderboard, but does anyone know a way to create an HP bar in a dialog? I've heard people say that dialogs can do everything better than leaderboards, but how do we do this?
The easy and usual way is to make a dialog item - image using image "green.dds". Then whenever unit life change, update that dialog item's size (width or height to a percentage of its original based on percentage of current life/ maximum life. Any more fancy stuff to add in could be done through trigger.
Ok, well with the green image, then you aren't able to have the cool "color changing" bar as the percentage decreases like you can with the leaderboard bar. Unless you change the color of the image, in which case you probably wouldn't be able to get a smooth transition.
With the boss bar though, aren't you restricted to its position at the top of the screen? Or is it possible to move it somewhere else? And can you resize it as well? Are you able to have multiple boss bars active at the same time?
Ok, well with the green image, then you aren't able to have the cool "color changing" bar as the percentage decreases like you can with the leaderboard bar. Unless you change the color of the image, in which case you probably wouldn't be able to get a smooth transition.
As I said earlier, all these fancy stuff can be replicated. Simply store amount of life each effect is dealt on unit when it is damaged, or use timer, etc... It should be smooth. The boss bar is actually just premade function from blizzard that used dialog with their default image/settings. Added parameter for you to change some setting.
Well you can easily create an HP bar in a leaderboard, but does anyone know a way to create an HP bar in a dialog? I've heard people say that dialogs can do everything better than leaderboards, but how do we do this?
The easy and usual way is to make a dialog item - image using image "green.dds". Then whenever unit life change, update that dialog item's size (width or height to a percentage of its original based on percentage of current life/ maximum life. Any more fancy stuff to add in could be done through trigger.
@ZarafFaraz: Go
Actually, the easiest way would have to be creating a Boss Bar.
-Under UI, select "Display Boss Bar," name it however you want and that should be good
-Then under UI Set the boss bar to your unit and refresh
-Done
UI - Display boss bar 1 with title "Health", portrait Assets\Textures\ui_chatbaricons_terran_individual.dds and maximum value 100 for (All players)
UI - Set boss bar 1 boss to Unit (Do refresh the boss bar)
Ok, well with the green image, then you aren't able to have the cool "color changing" bar as the percentage decreases like you can with the leaderboard bar. Unless you change the color of the image, in which case you probably wouldn't be able to get a smooth transition.
With the boss bar though, aren't you restricted to its position at the top of the screen? Or is it possible to move it somewhere else? And can you resize it as well? Are you able to have multiple boss bars active at the same time?
@ZarafFaraz: Go
You can move the Boss Bar with the action: "UI - Move Boss Bar" and you can have multiple, as for the resizing: I'm not sure, but you can check.
As I said earlier, all these fancy stuff can be replicated. Simply store amount of life each effect is dealt on unit when it is damaged, or use timer, etc... It should be smooth. The boss bar is actually just premade function from blizzard that used dialog with their default image/settings. Added parameter for you to change some setting.
Ok thanks, I'll look into that