ya ya you got the point... i do remember few rts:ses that did it this way
and the mm was it F9 should toggle between these 3 options
allways show
never show
and show when selected
show health only when selected
Moderator: Moderators
It could be done with the current LuaUI, but only for allied units
(I've got the code to support enemy unit queries written, but it
hasn't been committed yet).
It would be best to keep the basic F9 functionality in the main
Spring engine to minimize the overhead when dealing with large
numbers of units. For the case where only selected units get
health bars, LuaUI can do the rendering (it's already got the
GetSelectedUnits(), GetUnitHealth(), WorldToScreenCoords(),
and the necessary GL rendering calls). The stockpile build status
isn't available yet, nor are extra parameters like current shield
strength).
(I've got the code to support enemy unit queries written, but it
hasn't been committed yet).
It would be best to keep the basic F9 functionality in the main
Spring engine to minimize the overhead when dealing with large
numbers of units. For the case where only selected units get
health bars, LuaUI can do the rendering (it's already got the
GetSelectedUnits(), GetUnitHealth(), WorldToScreenCoords(),
and the necessary GL rendering calls). The stockpile build status
isn't available yet, nor are extra parameters like current shield
strength).
So I wrote the code to try using LuaUI to draw the unit bars,
and it seems to work fairly well (you can even setup your own
color gradient
) Then I got to thinking: what benefit is there
to only showing the health for selected units? The fact that you
can see the health for most enemy units in Spring makes it
kind of pointless.
One good thing that did come from this experiment is that I
noticed that the capture state can be displayed as a bar. Once
the enemy query code is in, you'll be able to draw the current
state of a capture.
and it seems to work fairly well (you can even setup your own
color gradient

to only showing the health for selected units? The fact that you
can see the health for most enemy units in Spring makes it
kind of pointless.
One good thing that did come from this experiment is that I
noticed that the capture state can be displayed as a bar. Once
the enemy query code is in, you'll be able to draw the current
state of a capture.
If possible, seeing the current status of a ressurrection would be nice too...LordMatt wrote:That would be nice!trepan wrote: One good thing that did come from this experiment is that I
noticed that the capture state can be displayed as a bar. Once
the enemy query code is in, you'll be able to draw the current
state of a capture.
preeetty thats the thingtrepan wrote:Then I got to thinking: what benefit is there
to only showing the health for selected units?
