[Request] Need HUD assistance
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
[Request] Need HUD assistance
I'm just gonna use this topic for help in general with my HUD for my mod I've been working on.
My current issue is adding a kill/secrets counter and trying to suss out how to change the color of my subweapon icons, check my latest post for more info.
Any help would be great, thanks guys.
My current issue is adding a kill/secrets counter and trying to suss out how to change the color of my subweapon icons, check my latest post for more info.
Any help would be great, thanks guys.
Last edited by Combine_Kegan on Tue Feb 04, 2014 6:57 pm, edited 1 time in total.
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Request] Need assistance with a HUD and a few powerups.
The HUD seems simple enough. Check [wiki]SBARINFO[/wiki] if you haven't already.
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need assistance with a HUD and a few powerups.
Okay so I've got the health bar to render, but now the problem is the overheal meter is laying over the initial lifebar, even when I'm not over 100. I'm uncertain how to fix that.
This is LIFBARA, this the empty life meter you see as your life diminishes
here's LIFBARB, this indicates your life is between 0 and 100
and here's LIFBARC, the overheal meter
Now I'm not sure how this works, but I'm assuming the life meter under normal circumstances stretches out, and I don't want that, so I have a dummy image that's twice as long as my lifebar that I use in conjunction with LIFBARC, which also has been doubled in length, but the other half being empty.
This is my SBARINFO thus far.
I can get the standard lifebar to render fine and drain, but the moment I add the overheal, that's when things get all mixed up. What am I doing wrong?
The worst part is I have a strong hunch it's something painfully simple.
This is LIFBARA, this the empty life meter you see as your life diminishes

here's LIFBARB, this indicates your life is between 0 and 100

and here's LIFBARC, the overheal meter

Now I'm not sure how this works, but I'm assuming the life meter under normal circumstances stretches out, and I don't want that, so I have a dummy image that's twice as long as my lifebar that I use in conjunction with LIFBARC, which also has been doubled in length, but the other half being empty.
This is my SBARINFO thus far.
Code: Select all
Height 0;
InterpolateHealth true;
InterpolateArmor true;
statusbar normal, fullscreenoffsets
{
drawbar "LIFBARB", "LIFBARA", health (100), horizontal, 10, -44;
drawbar "LIFBARC", "LIFBARX", health (200), horizontal, 10, -44;
}
The worst part is I have a strong hunch it's something painfully simple.
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Request] Need assistance with a HUD and a few powerups.
How does it look in game when over 100?
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need assistance with a HUD and a few powerups.
Nothing happens. I'll head back to the drawing board and refine this a little further
Edit:
Okay I went back and tweaked a few images, now there's a dummy lifebar that's just a transparent image to use as the background, and I've used drawimage to make the life/armor bars render on screen.
Now this is my code:
LIFEBARA is the dummy transparent lifebar, and currently right now LIFBARC is the overheal meter being rendered over LIFBARB even when I'm not overhealed.
and here's what it looks like in game

Edit:
Okay I went back and tweaked a few images, now there's a dummy lifebar that's just a transparent image to use as the background, and I've used drawimage to make the life/armor bars render on screen.
Now this is my code:
Code: Select all
statusbar normal, fullscreenoffsets
{
drawimage "LIFEARMR", 10, -60;
drawimage "MANABAR", -100, -60;
//life meter
drawbar "LIFBARB", "LIFBARA", health (100), horizontal, 13, -57;
drawbar "LIFBARC", "LIFBARA", health (200), horizontal, 13, -57;
and here's what it looks like in game

Last edited by Combine_Kegan on Fri Jan 24, 2014 9:09 am, edited 1 time in total.
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Request] Need assistance with a HUD and a few powerups.
Here is a demo of an overlay bar:
- Attachments
-
bar.zip
- (2.61 KiB) Downloaded 45 times
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need assistance with a HUD and a few powerups.
Hot damn, that was just the reference I needed. Check it out.Blue Shadow wrote:Here is a demo of an overlay bar:

Thank you!
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need assistance with a HUD and a few powerups.
I dislike double posting but I still have the issue of figuring out how to make those icons show when a player has enough ammo for those specific attacks. How would i go about that?
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Request] Need assistance with a HUD and a few powerups.
Use the [wiki]InInventory[/wiki] command in the following manner:
[wiki]DrawImage[/wiki]
Code: Select all
InInventory TheItemName, 30 // If you have 30 or more of this inventory item, draw an image.
{
DrawImage "H_BGKINV", -191, -63; // Just some example
}
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need assistance with a HUD and a few powerups.
once again Blue Shadow saves my bacon. Thanks man, you've been a huge help in finishing up my HUD.
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Request] Need assistance with a HUD and a few powerups.
You're welcome, sir.
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need assistance with a HUD and a few powerups.
Rather than making a new topic, I'll just bump this one as I have more HUD related questions.

I'm working on adding a new HUD Element: a Subweapon box to show what subweapon/spell combo the player currently has equipped, the spell is grayed out until the player has enough mana. Now adding the subweapon box, and changing out different icons depending on which subweapon a player has equipped pretty easy by using Ininventory and checking to see what the player has, but now I'm trying to think of the most effective way I can change the icon to its colored version when a player has enough mana.
Edit:
Oh and I'd like to add a kill and secrets counter too, how would I go about doing that?

I'm working on adding a new HUD Element: a Subweapon box to show what subweapon/spell combo the player currently has equipped, the spell is grayed out until the player has enough mana. Now adding the subweapon box, and changing out different icons depending on which subweapon a player has equipped pretty easy by using Ininventory and checking to see what the player has, but now I'm trying to think of the most effective way I can change the icon to its colored version when a player has enough mana.
Edit:
Oh and I'd like to add a kill and secrets counter too, how would I go about doing that?
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: [Request] Need HUD assistance
If I'm understanding you correctly, what you want is the else command. Example:
IMAGE1 could be the colored icon, and IMAGE2 could be the grayed-out one.
As for the tally, use [wiki]DrawNumber[/wiki] with kills, items (if you want), or secrets as the value.
Code: Select all
InInventory TheItemName, 30 // If you have 30 or more of this inventory item, draw IMAGE1
{
DrawImage "IMAGE1", -191, -63;
}
Else // Otherwise, draw IMAGE2
{
DrawImage "IMAGE2", -191, -63;
}
As for the tally, use [wiki]DrawNumber[/wiki] with kills, items (if you want), or secrets as the value.
- Combine_Kegan
- Posts: 467
- Joined: Sun Jan 19, 2014 8:12 am
- Location: Hopelessly stuck in the past
Re: [Request] Need HUD assistance
That did it, once again Blueshadow, you've been a big help with my HUD issues. Thanks againBlue Shadow wrote:If I'm understanding you correctly, what you want is the else command. Example:
IMAGE1 could be the colored icon, and IMAGE2 could be the grayed-out one.Code: Select all
InInventory TheItemName, 30 // If you have 30 or more of this inventory item, draw IMAGE1 { DrawImage "IMAGE1", -191, -63; } Else // Otherwise, draw IMAGE2 { DrawImage "IMAGE2", -191, -63; }
As for the tally, use [wiki]DrawNumber[/wiki] with kills, items (if you want), or secrets as the value.