AttributeProgressBar

Add a panel with a progress bar on the HUD with an associated attribute for the "progress" value.

    Note

  • Used for displaying boss/ally health bars and portraits in missions.
  • Uses .res files located in './p3/resource/UI/Hud/'

Syntax

AttributeProgressBar "[panel],show,[attribute]" -- Show the progress bar panel with the attribute's value hidden

AttributeProgressBar "[panel],show,[attribute],show_value" -- Show the progress bar panel with the attribute's value shown as well

AttributeProgressBar "[panel],hide" -- Hide the progress bar

Example


// (From ai_cashmart_npc.p3s, Cashmart Helicopter boss)
SetAttr "flag_zombie 1"
TargetEntByName gameplay
TargetToMem msGP
SetAttr "ea_dmg_absorb 95"
TargetPlayer 1
FireInput self,StartHunt

// Show the Panel and assign our health attribute
// ("Postal III/p3/resource/UI/Hud/HeliHealthPanel.res")
AttributeProgressBar "HeliHealthPanel,show,ea_health"

Timer tShout,5:2