GuiHealthBarHud¶
A basic health bar. Shows the damage value of the current PlayerObjectType control object.
- Inherit:
- GuiControl
Description¶
A basic health bar. Shows the damage value of the current PlayerObjectType control object.
This gui displays the damage value of the current PlayerObjectType control object. The gui can be set to pulse if the health value drops below a set value. This control only works if a server connection exists and it’s control object is a PlayerObjectType. If either of these requirements is false, the control is not rendered.
Example:
newGuiHealthBarHud(){
fillColor = "0.0 1.0 0.0 1.0"; // Fills with a solid green colorframeColor = "1.0 1.0 1.0 1.0"; // Solid white frame colordamageFillColor = "1.0 0.0 0.0 1.0"; // Fills with a solid red colorpulseRate = "500";
pulseThreshold = "0.25";
showFill = "true";
showFrame = "true";
displayEnergy = "false";
};
Fields¶
-
ColorF
GuiHealthBarHud::
damageFillColor
¶ As the health bar depletes, this color will represent the health loss amount.
-
bool
GuiHealthBarHud::
displayEnergy
¶ If true, display the energy value rather than the damage value.
-
ColorF
GuiHealthBarHud::
fillColor
¶ Standard color for the background of the control.
-
ColorF
GuiHealthBarHud::
frameColor
¶ Color for the control’s frame.
-
int
GuiHealthBarHud::
pulseRate
¶ Speed at which the control will pulse.
-
float
GuiHealthBarHud::
pulseThreshold
¶ Health level the control must be under before the control will pulse.
-
bool
GuiHealthBarHud::
showFill
¶ If true, we draw the background color of the control.
-
bool
GuiHealthBarHud::
showFrame
¶ If true, we draw the frame of the control.