[SBARINFO?] Drawing a meter for an inventory item

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
Grimm
Posts: 326
Joined: Tue May 11, 2004 7:42 pm

[SBARINFO?] Drawing a meter for an inventory item

Post by Grimm »

Hey folks,

I feel like kind of a jackass asking this complicated question, but it's been blocking my progress for awhile, so I need to get it resolved. So, I need a little meter of sorts to be placed onscreen, preferably in the HUD area, while a certain weapon is out, but not while a different one is selected. So let's just make pretend that I want this blue meter to pop up when you have the plasma gun out, which will display the amount of a certain dummy inventory item attached to the operation of the gun. And let's also say I want a little green meter to pop up when you have a rifle out. But then nothing for the other guns. How might I do this?
Blzut3
 
 
Posts: 3209
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO?] Drawing a meter for an inventory item

Post by Blzut3 »

Assuming the use of the svn versions of ZDoom you can use the IsSelected command to detect the weapon. DrawBar should accept any inventory item as the number.
Grimm
Posts: 326
Joined: Tue May 11, 2004 7:42 pm

Re: [SBARINFO?] Drawing a meter for an inventory item

Post by Grimm »

I'm not quite looking for a number output though, I want an actual graphical meter to display.
Blzut3
 
 
Posts: 3209
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [SBARINFO?] Drawing a meter for an inventory item

Post by Blzut3 »

Since when was drawbar a numeric output?
Grimm
Posts: 326
Joined: Tue May 11, 2004 7:42 pm

Re: [SBARINFO?] Drawing a meter for an inventory item

Post by Grimm »

If I knew the answer to that, I probably wouldn't have posted a thread about it.
Locked

Return to “Editing (Archive)”