Sorry to see this go down the tubes.
It is a bit much to ask for, though.... however, using the Mod the scripts are rather painless to create!
Here, I'll demonstrate:
Health Bar;
:state=0:<load Health Bar HUD, named HealthHUD>
:state=0:<load Armor Bar HUD, named ArmorHUD>
:state=0:<load Health Bar outline/overlay HUD>
;By loading in the HUDs above in that sequenc, the Health Bar will be below the Armor Bar and the Armor Bar below the outline HUD
:state=0:dimvar=Armor,setvar=Armor 500,dimvar=CalcVar,dimvar=CO,state=1
; Scale the Bars to have them shrink at lower levels
; Use $PH to grab the player's current Health
; Find out how much to scale by using (Current/Max)
:state=1:setvar=CalcVar $PH,divvar=CalcVar 500,scalehudx=HealthHUD %CalcVar
:state=1:setvar=CalcVar Armor,divvar=CalcVar 500,scalehudx=ArmorHUD %CalcVar
; Have the Armor take damage instead of the player's health
:state=1:setvar=CalcVar %CO,subvar=CalcVar $PH,setvar=CO %CalcVar
:state=1,vargreater=CO 0,vargreater=Armor 0:setvar=CalcVar 500,subvar=CalcVar $PH,plraddhealth=%CalcVar,subvar=Armor %CalcVar
:state=1,varless=Armor 0:setvar=Armor 0
:state=1:setvar=CO $PH
This will control both the Health and Armor vars and sets up the variables needed for them. A bit more coding and you could even have the Armor regenerate. I made a script for that some time ago in the script board... just do a search for "Armor" and you should be able to find it.
NOTE:
- This script assumes your maximum health is 500 and your maximum Armor is 500.
- The HUD will shrink towards the Left when damage is taken.
- The player's Armor will absorb ALL DAMAGE until it reaches 0, afterwards the player's Health will start taking the damage.
- The "Red Flash" when getting hit will still show up even if the player's armor is taking the damage.
- This script requires Ply's Mod V1.07 Beta2 (Not
yet released, but will be soon)
Without the Armor, this script would be a single line long (Not including loading the HUDs and declaring variables)
If you want the bars to shrink towards the center or to the right, you'll just need to add a repositioning action on each line that scales the HUD.
I wouldn't expect people to know how to do this, since I haven't released the version of Ply's Mod necessary to achieve it... I just wanted to let everyone know how simple it will be to do.
The one and only,
Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.