Trying to make a dialog label to display both the unit's current health as well as its max health, seperated by a /, much like in most RPG health bars. I want to do this in a single label but I am not sure how to include two variables. I am guessing that this would be easily done with a custom script but I haven't dipped my toe into the language yet.. only triggers thus far. Any ideas?
it can be done with triggers, I have in fact already made that before, however I am now at work and don't have access to the editor here. When I come home I'll copy and paste the triggers I used
Here is a link to an asset which shows how to do it, but also how to do color changing of the bar when it drops below a certain amount, as far as I understood from the description. I know there was a good tutorial here before which I used myself but I can't seem to find it anymore.
Trying to make a dialog label to display both the unit's current health as well as its max health, seperated by a /, much like in most RPG health bars. I want to do this in a single label but I am not sure how to include two variables. I am guessing that this would be easily done with a custom script but I haven't dipped my toe into the language yet.. only triggers thus far. Any ideas?
it can be done with triggers, I have in fact already made that before, however I am now at work and don't have access to the editor here. When I come home I'll copy and paste the triggers I used
Here is a link to an asset which shows how to do it, but also how to do color changing of the bar when it drops below a certain amount, as far as I understood from the description. I know there was a good tutorial here before which I used myself but I can't seem to find it anymore.
http://www.sc2mapster.com/assets/custom-ui-color-gradient-functio/
@voodude2008: Go
Edit: This might be easier to understand:
As for keeping the HP updated, make a trigger that runs every 0.0 sec and
@Kanaru: Go
Thanks again! You guys are so helpful. I can say I learn something new everyday :D
Well, no need to copy/paste my triggers here, since it's pretty much the same setup as Kanaru posted.