Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Health ---
HealthProgress.setValue(%hP);
$health = %hP;
if($Pref::Hud::DynamicBars)
{
if(%hP <= (3/4) && (%hP >= (1/4)) && ($PlayerGotFlag)) {HealthProgressProfile.fillColor = "187 84 0 255";}
else if(%hP <= (1/2) && (%hP >= (1/4))) {HealthProgressProfile.fillColor = "187 84 0 255";}
else if(%hP <= (1/4)) {HealthProgressProfile.fillColor = "135 0 0 255";}
else {HealthProgressProfile.fillColor = "0 125 29 255";}
}
else HealthProgressProfile.fillColor = "0 125 29 255";
if(($Pref::Hud::NumericHP !$= "Off") && !$Pref::Hud::NumericHP)
{
HealthText.setText("<just:right>" @ (%hV @ "%"));
HealthText2.setText("<just:right>" @ (%hV @ "%"));
if(%hP <= (3/4) && (%hP >= (1/4)) && ($PlayerGotFlag)) {HealthTextProfile.fontColor = "255 96 0 255"; HealthTextProfile2.fontColor = "255 96 0 255";}
else if(%hP <= (1/2) && (%hP >= (1/4))) {HealthTextProfile.fontColor = "255 96 0 255"; HealthTextProfile2.fontColor = "255 96 0 255";}
else if(%hP <= (1/4)) {HealthTextProfile.fontColor = "255 0 0 255"; HealthTextProfile2.fontColor = "255 0 0 255";}
else {HealthTextProfile.fontColor = "0 255 0 255"; HealthTextProfile2.fontColor = "0 255 0 255";}
}
else {HealthText.setText(""); HealthText2.setText("");}
// Weapon & Item Ammo ---
Finally figured it out if you're still interested.
Video
Code:// Health ---
Ohhh well that explains it. At first, i'm like "what am I watching?" But watching it the second time after reading your post, I understood it. Good job!This only changes the health bar at the top so it's orange at 75% while holding the flag and 50% when not. Merely a visual change, nothing else.
lol ok...Fixi, add the cappers health to the HUD
Too complex for me. I tried.Fixi, add the cappers health to the HUD
Fixi, add the cappers health to the HUD
...or is it?!Just place a chaingun in front of you in the editor. It wasn't functional or anything.