System Floating Bars

Steel

Software Engineer
Reaction score
109
I didn't know if there is an area where coded system should be put, but I figured here would be best to get approval first. This system will make an HP and MP bar above any unit you wish. Much like holding alt but you don't need to, and it has a mana bar.

FloatingBars.jpg


Map is attached. All instructions are included. To turn on a bar single click a unit, to turn off a bar double click.

The map does get lag when many units have the bars above their head. If this occurs please go to the custom script and increase the Frequency function slightly. I am working on a different approach to handle many units at a time.


Bugs
Fixed bug with visibility

Enjoy.
 

Attachments

  • Floating Bars.w3x
    21.4 KB · Views: 483

Hero

─║╣ero─
Reaction score
250
I was working on something like this too..lol

maybe I can learn from yours..

anyways I will test it and view the code

It is made in JASS correct?
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Wow, very nice system! I will 100% use in in my map :p (It's a real life type)
Of course, credits to you.

Also, you can turn it on/off with F1 too :p (only for you heroes though)

Anyways, i read GUI better :p (Let's not start an arguement on GUI and JASS, it's as good as the person using it)
 

Steel

Software Engineer
Reaction score
109
Hitting F1 selects your hero, so it still triggers the same event and either way it works, but this will only work for your heros.
 

a j j bones

New Member
Reaction score
3
works fine for me but just a note, i had to import the triggers before the map scirpt or i kept getting a critical error and the map shut, might want to tell people that. :D
 

Halofan

New Member
Reaction score
7
Good...now I can understand it better...we all agree GUI is disgusting to read..lol

I like GUI better, but that's just my opinion. Anyway, would this be possible to recreate in GUI? And if so, could I make the health bar appear only over a certain unit and make it unable to be turned off? And finally, can AI opponents see this, or is this just visible to a certain player(s)?
 

Hero

─║╣ero─
Reaction score
250
It is possible in GUI..

In fact I think I'll make one in JASS and GUI
 

Halofan

New Member
Reaction score
7
Great, but can you please answer my other questions? Because those matter more in this case than GUI or JASS.
 

Hero

─║╣ero─
Reaction score
250
could I make the health bar appear only over a certain unit and make it unable to be turned off?

I should be able to...I'll add a function that adds the health bar to any uit you add to the function
And finally, can AI opponents see this, or is this just visible to a certain player(s)?
AI?
Like computers? Well even if they could see it what would it do..lemme rephrase your question.

Code:
Can other players see it?

I don't know about this system...but I can make it only show for certain players or for all players if you want..
 

Halofan

New Member
Reaction score
7
Great, thanks. I just need a trigger that adds the health bar to a unit when it spawns, and for the bar to disappear when it dies. Also, would there be an easy way to turn this off for cinematics? Thx

PS... keep in mind if you could that I use GUI, I haven't been able to pick up JASS yet:eek:.
 

Steel

Software Engineer
Reaction score
109
Unless you use custom script I really don't think its possible in GUI. The periodical timeouts on a timer are extremely fast, much faster than a PolledWait, or a TriggerSleepAction, so the bar won't follow the hero all that quickly.

I don't see why you would want this in GUI? The system wouldn't be something you would want to touch.
 

Aqua Dragon

I'm made of water. Remember that now.
Reaction score
72
Aw come on, just let him get it in GUI, it's not all that bad. Anything can be done in GUI, it just takes more time :D
 
Reaction score
456
Everything can be made in GUI?
I wouldn't say so, cause it's freaking hard to make spells MUI in GUI.

In JASS you have more possibilities. Good system by the way :)
 

Tinki3

Special Member
Reaction score
418
Unless you use custom script I really don't think its possible in GUI. The periodical timeouts on a timer are extremely fast, much faster than a PolledWait, or a TriggerSleepAction, so the bar won't follow the hero all that quickly.
Timers can also be used in GUI; not just Polled Waits and Sleep Actions.

I found it neat and accurate, but useless for heroes - units sort of.

I don't see any reason as to why someone couldn't just hold Alt for a few seconds.

However, the fact that it was 'constant' was quite usefull; it does get annoying having to press Alt all the time, or hovering over units.

+rep for the accomplishment anyways.
 

Steel

Software Engineer
Reaction score
109
If the HP bar is useless because you can just hold ALT, then the mana bar is another feature that is new so I figure its good right?

I did this because I thought it would be interesting and useful.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
It could be better if you disabled ALT for the units/heroes/objects that have the system on.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top