So this is what i did:

Its meant to give rough idea how much is left inside the box. This example shows for a 100round belt.
And this is how i did it:
Code: Select all
hudBuilder.createSplitNode IngameHud AmmoIndicatorHud
hudBuilder.createPictureNode AmmoIndicatorHud AmmoIndicatorFrame 760 580 10 18
hudBuilder.setPictureNodeTexture Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorFrame.dds
hudBuilder.setNodeRGBVariables PrimaryClipColorRed PrimaryClipColorGreen PrimaryClipColorBlue
hudBuilder.createCompassNode AmmoIndicatorHud AmmoIndicatorBar 3 761 581 8 16 1 0
hudBuilder.setCompassNodeTexture 1 Ingame\Weapons\Icons\Hud\AmmoIndicator\AmmoIndicatorBar.dds
hudBuilder.setCompassNodeTextureSize 808 16
hudBuilder.setCompassNodeBorder 0 0 0 -4220
hudBuilder.setCompassNodeValueVariable PrimaryAmmo
hudBuilder.setCompassNodeOffset 0
hudBuilder.setNodeRGBVariables PrimaryClipColorRed PrimaryClipColorGreen PrimaryClipColorBlue
This requires a new bar and a new compass for each amount of ammo per belt, but that could be easily be done by giving certain guiindexes to certain magazine sizes.
Also it took me quite some trial and error to figure out the corret number for "hudbuilder.setCompassNodeBorder" does anyone know what it really does?











