[Request] Need HUD assistance

Requests go in THIS forum!
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.
Post Reply
User avatar
Combine_Kegan
Posts: 467
Joined: Sun Jan 19, 2014 8:12 am
Location: Hopelessly stuck in the past

[Request] Need HUD assistance

Post by Combine_Kegan »

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.
Last edited by Combine_Kegan on Tue Feb 04, 2014 6:57 pm, edited 1 time in total.
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: [Request] Need assistance with a HUD and a few powerups.

Post by Blue Shadow »

The HUD seems simple enough. Check [wiki]SBARINFO[/wiki] if you haven't already.
User avatar
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.

Post by Combine_Kegan »

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 Image
here's LIFBARB, this indicates your life is between 0 and 100 Image
and here's LIFBARC, the overheal meter Image

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;
}
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.
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: [Request] Need assistance with a HUD and a few powerups.

Post by Blue Shadow »

How does it look in game when over 100?
User avatar
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.

Post by Combine_Kegan »

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:

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;

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

Image
Last edited by Combine_Kegan on Fri Jan 24, 2014 9:09 am, edited 1 time in total.
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: [Request] Need assistance with a HUD and a few powerups.

Post by Blue Shadow »

Here is a demo of an overlay bar:
Attachments
bar.zip
(2.61 KiB) Downloaded 45 times
User avatar
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.

Post by Combine_Kegan »

Blue Shadow wrote:Here is a demo of an overlay bar:
Hot damn, that was just the reference I needed. Check it out.

Image

Thank you!
User avatar
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.

Post by Combine_Kegan »

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?
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: [Request] Need assistance with a HUD and a few powerups.

Post by Blue Shadow »

Use the [wiki]InInventory[/wiki] command in the following manner:

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
}
[wiki]DrawImage[/wiki]
User avatar
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.

Post by Combine_Kegan »

once again Blue Shadow saves my bacon. Thanks man, you've been a huge help in finishing up my HUD.
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: [Request] Need assistance with a HUD and a few powerups.

Post by Blue Shadow »

You're welcome, sir.
User avatar
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.

Post by Combine_Kegan »

Rather than making a new topic, I'll just bump this one as I have more HUD related questions.

Image


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?
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: [Request] Need HUD assistance

Post by Blue Shadow »

If I'm understanding you correctly, what you want is the else command. Example:

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;
}
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.
User avatar
Combine_Kegan
Posts: 467
Joined: Sun Jan 19, 2014 8:12 am
Location: Hopelessly stuck in the past

Re: [Request] Need HUD assistance

Post by Combine_Kegan »

Blue Shadow wrote:If I'm understanding you correctly, what you want is the else command. Example:

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;
}
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.
That did it, once again Blueshadow, you've been a big help with my HUD issues. Thanks again
Post Reply

Return to “Requests”