asw_health_bar

From Source Entities
Jump to navigation Jump to search
Info.png

This entity is not in the stock FGD files by default.
See below for instructions on making it available.

Code classes:

asw_health_bar is a point entity present in Asw.pngAlien Swarm. It creates a health bar similar to the ones seen on players. The bar is linked to a hurtable entity by setting the Parent (parentname) keyvalue.

FGD Code[edit | edit source]

Note: The box is not very accurate to the proportions of the bar ingame.

@PointClass base(Targetname, Parentname, RenderFields, EnableDisable) size(-32 -2 -8, 32 2 8 ) line(255 0 0, targetname, parentname) color(220 150 30) = asw_health_bar : "A health bar similar to the ones on players. Link it up to a hurtable entity by the parentname."
[
    hideatfullhealth(boolean) : "Hide at Full Health?" : 0 : "Hides the bar if the parent object is at full health."
    scale(float) : "Scale" : "1.0" : "Scale multiplier of the sprite."
]

Keyvalues[edit | edit source]

Hide at Full Health? (hideatfullhealth) <boolean>
Hides the bar if the parent object is at full health.
Scale (scale) <float>
Scale multiplier of the sprite.
Color & Alpha (color) <color255>
Useless keyvalue that just sets Render Color and Render Amount.
Start Disabled (StartDisabled) <boolean>
Stay inactive until Enabled.
Render Mode (rendermode) <choices>
A special rendering mode to use on this entity.
Render Amount/Transparency (renderamt) <integer>
Transparency amount, requires a Render Mode (rendermode) other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color channel filter to add to this entity's texture(s). Bug: P2.pngCsgo-small.pngBroken for brush entities.
Render FX (renderfx) <choices>
Preset appearance effects. Partially supported in Asw.png, completely non-functional in P2.pngCsgo-small.png. Bug: Sometimes functions incorrectly if changed with AddOutput, but is the only way to change effects other than making multiple versions of the object.

Inputs[edit | edit source]

Enable
Makes the entity active.
Disable
Makes the entity inactive.
Alpha <integer>
Sets Render Amount/Transparency (renderamt).
Color <color255>
Sets the Render Color (rendercolor).