Torque 3D - Script Manual: GuiHealthTextHud Class Reference

TorqueScript

Main   Class List   Namespace List   Online

GuiHealthTextHud Class Reference
[Game Controls]

Shows the health or energy value of the current PlayerObjectType control object. More...

Inheritance diagram for GuiHealthTextHud:

List of all members.

Public Attributes

Colors

ColorF fillColor
 Color for the background of the control.
ColorF frameColor
 Color for the control's frame.
ColorF textColor
 Color for the text on this control.
ColorF warningColor
 Color for the text when health is low.
Alert

int pulseRate
 Speed at which the control will pulse.
float pulseThreshold
 Health level at which to begin pulsing.
float warnThreshold
 The health level at which to use the warningColor.
View

bool showEnergy
 If true, display the energy value rather than the damage value.
bool showFill
 If true, draw the background.
bool showFrame
 If true, draw the frame.
bool showTrueValue
 If true, we don't hardcode maxHealth to 100.

Detailed Description

Shows the health or energy value of the current PlayerObjectType control object.

This gui can be configured to display either the health or energy value of the current Player Object. It can use an alternate display color if the health or drops below a set value. It can also be set to pulse if the health or energy 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:
 new GuiHealthTextHud(){
   fillColor = "0.0 0.0 0.0 0.5"; // Fills with a transparent black color
   frameColor = "1.0 1.0 1.0 1.0"; // Solid white frame color
   textColor = "0.0 1.0 0.0 1.0" // Solid green text color
   warningColor = "1.0 0.0 0.0 1.0"; // Solid red color, used when damaged
   showFill = "true";
   showFrame = "true";
   showTrueValue = "false";
   showEnergy = "false";
   warnThreshold = "50";
   pulseThreshold = "25";
   pulseRate = "500";
   profile = "GuiBigTextProfile";
};

Member Data Documentation

Color for the background of the control.

Color for the control's frame.

Speed at which the control will pulse.

Health level at which to begin pulsing.

If true, display the energy value rather than the damage value.

If true, draw the background.

If true, draw the frame.

If true, we don't hardcode maxHealth to 100.

Color for the text on this control.

Color for the text when health is low.

The health level at which to use the warningColor.



Copyright © GarageGames, LLC. All Rights Reserved.