I have found a partial solution to the "initial" ammunition being displayed on the in-game HUD. This solution stops this from happening for all weapons, except for the Sprayer (Flamethrower).
For the HUD to display the magazine size and how many clips were left, I followed the above example for all ammunition types and got this result:
Code: Select all
[pistol_shell]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~pistol_shell]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
[GL_Grenade]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~GL_Grenade]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
[disk]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~disk]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
[rifle_shell]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~rifle_shell]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
[10mm_shell]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~10mm_shell]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
[shotgun_shell]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~shotgun_shell]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
You'll notice that the Sprayer (Flamethrower) isn't on there, more on that later.
After reading through the manual again, I re-read the section that teaches you how to make this HUD, and it mentions adding an "active = false" statement to prevent it all showing up at once. So, after trying and having no success, I decided to see if it has an effect in the "player.ini" document. Success. The added statement looked like the following:
Code: Select all
[pistol_shell]
initial = 65
low = 0
high = 130
active = false
[shotgun_shell]
initial = 40
low = 0
high = 100
active = false
(I've added the statement to each ammunition type)
However, the issue was still happening, so I decided to pin-point the exact problem. It turned out to be the Sprayer (Flamethrower). After deleting it's ammunition magazine and clip display, the issue went away. So, all in all, this solution works for all weapons except for the Sprayer (Flamethrower). I have a feeling that it could be the ammunition type, as it doesn't use bullets? I'll be experimenting, if I find a solution for the Sprayer (Flamethrower), I'll post it here.
Anyways, I hope this helps someone.
EDIT: I have found the solution to the Sprayer (Flamethrower) problem.
After adding the Sprayer (Flamethrower) version of the code to the "hud.ini" file:
Code: Select all
[ball]
type = numeric
style = magazine
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 520
font = 7
width = 3
active = false
[~ball]
type = numeric
style = clip
framex = 10
framey = 10
indicatoroffsetx = 36
indicatoroffsety = 540
font = 7
width = 3
active = false
Just make sure that you leave a few blank lines at the end. So after the last "active = false" just press enter a few times to create some blank lines, like I've done in the example above.
It was a minor problem that I'm now face planting myself over!
Enjoy.
NOTE: Just to make it easier for others to find, I'll add some keywords that will help with their search.
Tags: how , to , hud , ammo , ammunition , help , solution , working , heads , up , display , player.ini , hud.ini