• 🏆 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!

how to disable health bars?

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
You can do it on 2 ways.

1. Go to the object editor and search for the units that you dont want to have health bars.
Go to "Art - Selection Scale" and set it to -10.
(You have to shift+enter to be able to set negative values and you have "Allow negative real values in Object Editor" turned on. This can be found in Terrain Editor -> File -> Preferences -> General.)

2. Go to the trigger editor and make a GUI trigger and make it run on map initialization.
Create a "Game - Enable/Disable Pre-Selection" and set the first value to "Enable" and the second value to "Disable".
Note that if you as player have "Always show health bars" in the options menu of the game turned on, this will crash the game.
 
Level 12
Joined
May 9, 2009
Messages
735
You can also turn off healthbars for a unit using the following method, however this way you will also turn off the ability to select the unit.

1) Using triggers add the 'locust' ability to your unit whenever it is made. You mighty have to use custom script use something like this call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() ).

2) Create a custom ability based off the 'chaos' ability and set the unit for it which you want. Note the unit of the chaos ability must be different from your created unit. Add this ability using triggers to the unit as well after the locust ability.

You will get an unselectable unit (the unit itself will be the one which is in the chaos ability) which doesn't show healthbars at all. The unit still can be attacked and can still auto-target or receive orders by triggers and has collision.
 
Status
Not open for further replies.
Top