News:

Come Chat with us live! Learn how HERE!

Main Menu

Percentage of Energy?

Started by OhaiReapd, October 13, 2010, 09:50:21 PM

OhaiReapd

I'm making a hud, and I would like to put a percentage of how much energy is left. This is for GPP and could you give me the code for it? :D

Thanks

~Reapd

Plague Bringer

Check the GPP HUD and look at the charge bars.
U R A Q T

OhaiReapd

Quote from: Plague Bringer on October 19, 2010, 03:40:45 PM
Check the GPP HUD and look at the charge bars.

The standard one? Hmmm.

Plague Bringer

Quote from: OhaiReapd on October 20, 2010, 04:57:21 AM
Quote from: Plague Bringer on October 19, 2010, 03:40:45 PM
Check the GPP HUD and look at the charge bars.

The standard one? Hmmm.
Any of 'em.

It'll either go by % of charge or increase with the time the button is held. You could inverse that, to have a bar decrease with the time held.
U R A Q T

F50

Actually Plague Bringer, the standard charge bar (for Lucifer cannon, pounce etc.) uses its own special functions to determine its progress, among other things. Its not really a HUD thing.
"Any sufficiently advanced stupidity is indistinguishable from malice." -- Grey's Law


OhaiReapd

Quote from: F50 on October 21, 2010, 04:27:32 AM
Actually Plague Bringer, the standard charge bar (for Lucifer cannon, pounce etc.) uses its own special functions to determine its progress, among other things. Its not really a HUD thing.

So it has to be coded in.

Plague Bringer

Quote from: F50 on October 21, 2010, 04:27:32 AM
Actually Plague Bringer, the standard charge bar (for Lucifer cannon, pounce etc.) uses its own special functions to determine its progress, among other things. Its not really a HUD thing.
In that case I'd assume that there's either no way to integrate a % bar directly into the HUD or it's too difficult or time consuming to do.


EDIT:
Do sections of the HUD have variable alphas? Can you arrange a few boxes and have them fade out one-by-one as stamina goes down?
U R A Q T

Demolution

If you can do it with ammo clips, why not with stamina?

Clan [AC] - For all your air conditioning needs please visit: http://s1.zetaboards.com/AC_NoS/index/
Quote from: swamp-cecil on October 05, 2010, 09:04:04 PM
my brain > your brain.
and i am VERY stupid.

CreatureofHell

Quote from: Demolution on October 21, 2010, 08:12:19 PM
If you can do it with ammo clips, why not with stamina?

At a random guess, not knowing anything here, I would say the ammo clips are just bars made up of a number of rectangles and are decreased by the ammo usage and not percent.
{NoS}StalKer
Quote<Timbo> posting on the trem forums rarely results in anything good

OhaiReapd

I have a way to make a bar. But it's not what I want.

Plague Bringer

Quote from: CreatureofHell on October 21, 2010, 08:57:28 PM
Quote from: Demolution on October 21, 2010, 08:12:19 PM
If you can do it with ammo clips, why not with stamina?

At a random guess, not knowing anything here, I would say the ammo clips are just bars made up of a number of rectangles and are decreased by the ammo usage and not percent.
Stamina is a value. We can read that value and increase or decrease bars accordingly.
U R A Q T

OhaiReapd

Quote from: Plague Bringer on October 22, 2010, 01:01:05 AM
Quote from: CreatureofHell on October 21, 2010, 08:57:28 PM
Quote from: Demolution on October 21, 2010, 08:12:19 PM
If you can do it with ammo clips, why not with stamina?

At a random guess, not knowing anything here, I would say the ammo clips are just bars made up of a number of rectangles and are decreased by the ammo usage and not percent.
Stamina is a value. We can read that value and increase or decrease bars accordingly.

Sooo mind telling me how?

Plague Bringer

Quote from: OhaiReapd on October 22, 2010, 10:43:51 AM
Quote from: Plague Bringer on October 22, 2010, 01:01:05 AM
Quote from: CreatureofHell on October 21, 2010, 08:57:28 PM
Quote from: Demolution on October 21, 2010, 08:12:19 PM
If you can do it with ammo clips, why not with stamina?

At a random guess, not knowing anything here, I would say the ammo clips are just bars made up of a number of rectangles and are decreased by the ammo usage and not percent.
Stamina is a value. We can read that value and increase or decrease bars accordingly.

Sooo mind telling me how?
Check the code. It's in there somewhere.
U R A Q T

superspirality

Quote from: Plague Bringer on October 22, 2010, 06:39:53 PM
Quote from: OhaiReapd on October 22, 2010, 10:43:51 AM
Quote from: Plague Bringer on October 22, 2010, 01:01:05 AM
Quote from: CreatureofHell on October 21, 2010, 08:57:28 PM
Quote from: Demolution on October 21, 2010, 08:12:19 PM
If you can do it with ammo clips, why not with stamina?

At a random guess, not knowing anything here, I would say the ammo clips are just bars made up of a number of rectangles and are decreased by the ammo usage and not percent.
Stamina is a value. We can read that value and increase or decrease bars accordingly.

Sooo mind telling me how?
Check the code. It's in there somewhere.