Arch
Legions Developer
So, with the help of NightHawk (Thanks a bunch), I've been working on turning the ammo values into percentages and then into bars that eat away as you use ammo. I've got them in the percentages and currently display on the HUD as digits. The top being weapon ammo, bottom being item (grenade) ammo.
I took a look at how the coresHud.gui displays this so I tried using new GuiProgressCtrl and linking it to weaponammoProgress (which sets the value of the percentage of ammo left) . But it doesn't seem to do anything. Is there a way to make this work or lay it out in a different way?

I took a look at how the coresHud.gui displays this so I tried using new GuiProgressCtrl and linking it to weaponammoProgress (which sets the value of the percentage of ammo left) . But it doesn't seem to do anything. Is there a way to make this work or lay it out in a different way?
Code:
$weaponammoValue = (100- mCeil(((%maxammo - %ammo)/%maxammo)*100));
weaponammoProgress.setValue("<just:center>" @ ($weaponammoValue @ "%"));
Code:
new GuiProgressCtrl(weaponammoProgress)
{
maxlength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
isContainer = "1";
profile = "CoreCooldownProfile";
horizsizing = "center";
vertsizing = "bottom";
position = "0 100";
extent = "202 7";
minextent = "100 20";
cansave = "1";
visible = "1";
canSaveDynamicFields = "0";
new GuiBitmapCtrl()
{
isContainer = "1";
bitmap = "mods/autoexec/Sync/AmmoBar/top.png";
profile = "SyncTransBG";
horizsizing = "right";
vertsizing = "bottom";
extent = "202 7";
position = "0 0";
};