Torque 3D - Script Manual: GuiHealthBarHud Class Reference

TorqueScript

Main   Class List   Namespace List   Online

GuiHealthBarHud Class Reference
[Game Controls]

A basic health bar. Shows the damage value of the current PlayerObjectType control object. More...

Inheritance diagram for GuiHealthBarHud:

List of all members.

Public Attributes

Colors

ColorF damageFillColor
 As the health bar depletes, this color will represent the health loss amount.
ColorF fillColor
 Standard color for the background of the control.
ColorF frameColor
 Color for the control's frame.
Misc

bool displayEnergy
 If true, display the energy value rather than the damage value.
bool showFill
 If true, we draw the background color of the control.
bool showFrame
 If true, we draw the frame of the control.
Pulse

int pulseRate
 Speed at which the control will pulse.
float pulseThreshold
 Health level the control must be under before the control will pulse.

Detailed 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:
 new GuiHealthBarHud(){
   fillColor = "0.0 1.0 0.0 1.0"; // Fills with a solid green color
   frameColor = "1.0 1.0 1.0 1.0"; // Solid white frame color
   damageFillColor = "1.0 0.0 0.0 1.0"; // Fills with a solid red color
   pulseRate = "500";
   pulseThreshold = "0.25";
   showFill = "true";
   showFrame = "true";
   displayEnergy = "false";
};

Member Data Documentation

As the health bar depletes, this color will represent the health loss amount.

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

Standard color for the background of the control.

Color for the control's frame.

Speed at which the control will pulse.

Health level the control must be under before the control will pulse.

If true, we draw the background color of the control.

If true, we draw the frame of the control.



Copyright © GarageGames, LLC. All Rights Reserved.