• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

New Bar

Status
Not open for further replies.
Level 8
Joined
Sep 17, 2009
Messages
606
Greetings.
I was woundering if there is a possibility of adding a new bar to a unit.
Existing ones are the health bar and mana bar. For the map im making I would like to add an extra bar. Health bar would be health, mana would be ammunation, and the new bar would be gas deposit (how much still left).
Is there a way of adding a new bar?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Yeah... there are a few ways I guess.

As far as I know, you could do it with a floating text and with images.
Obviously, the floating text is the easiest.
(Just create some string variables with array for the floating text, such as:
Text[1] = |c00ff0000IIIII|r|c00ffcc00IIIII|r|c0000ff00IIIII|r
Text[2] = |c00ff0000IIIII|r|c00ffcc00IIIII|r|c00666666IIIII|r
...
Which will look like
IIIIIIIIIIIIIII
IIIIIIIIIIIIIII
Of course, this isn't exaclty in the correct order or something and you'll need 10-20 of these text-variables to set up a smooth progress bar :/

Then you can loop a trigger to place the floating texts above ones head, when the progress is 50% and you have 10 of those messages, you could show Text[6] above the unit's head.
Well, this is just an example :p
 
Level 14
Joined
Oct 18, 2008
Messages
599
Yeah... there are a few ways I guess.

As far as I know, you could do it with a floating text and with images.
Obviously, the floating text is the easiest.
(Just create some string variables with array for the floating text, such as:
Text[1] = |c00ff0000IIIII|r|c00ffcc00IIIII|r|c0000ff00IIIII|r
Text[2] = |c00ff0000IIIII|r|c00ffcc00IIIII|r|c00666666IIIII|r
...
Which will look like
IIIIIIIIIIIIIII
IIIIIIIIIIIIIII
Of course, this isn't exaclty in the correct order or something and you'll need 10-20 of these text-variables to set up a smooth progress bar :/

Then you can loop a trigger to place the floating texts above ones head, when the progress is 50% and you have 10 of those messages, you could show Text[6] above the unit's head.
Well, this is just an example :p
he is basically saying, a variable for each "I" in the bar :/ i suggest you loop for it.
 
Status
Not open for further replies.
Top