There are probably a lot of ways to do this now, I plan to use dialogs because I don't like the UI editor. I know how to create a dialog and update it properly but I don't know how to attach it to the player's hero. The hero can change a number of times throughout the game and it is the only unit they control at any one time (but they can buy items).
What I'm asking is when to run the action attach dialog to unit so that every hero has a health bar at any point in the game.
There are probably a lot of ways to do this now, I plan to use dialogs because I don't like the UI editor. I know how to create a dialog and update it properly but I don't know how to attach it to the player's hero. The hero can change a number of times throughout the game and it is the only unit they control at any one time (but they can buy items).
What I'm asking is when to run the action attach dialog to unit so that every hero has a health bar at any point in the game.
@Alchemist43: Go
Whenever a hero is created/changed, run the custom action/trigger.
@Enexy: Go
Okay thanks, and just wondering, the dialogs will auto-hide when the unit they are attached to is not "visible" right?
@Alchemist43: Go
when the unit moves offscreen the dialog will disappear, when the unit appears on screen the dialog will reappear.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@Alchemist43: Go
Depends what you mean by not visible.
I just mean its not visible through fog of war. The moving off-screen part is good.
IDK why don't you test it in a new map? That's the best way to find out.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@Alchemist43: Go
It'll show even though the unit is not visible in fog of war.
easy enough to get around, just run a loop that will check to see if the unit is visible for each player, and hide it if it isn't, and show if it is.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)