Show Unbuilt Structure Health

twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
edited August 2011 in Modding
<div class="IPBDescription">one line modification</div>To display the health of an unfinished building, edit NS2Utility.lua, function GetCrosshairText:
Change last line (about line 1316, it may change each new build):
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if entity:isa("Structure") and not enemyTeam then
            if not entity:GetIsBuilt() then
                statusText = string.format("(%.0f%%)", Clamp(math.ceil(entity:GetBuiltFraction() * 100), 0, 100))<!--c2--></div><!--ec2--> // <---- this line
to
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->statusText = string.format("(%.0f%%) (%.0f%%HP)", Clamp(math.ceil(entity:GetBuiltFraction() * 100), 0, 100), Clamp(math.ceil(entity:GetHealthScalar() * 100), 0, 100))<!--c2--></div><!--ec2-->
Sign In or Register to comment.