Author Topic: Percentage of Energy?  (Read 9019 times)

OhaiReapd

  • Guest
Percentage of Energy?
« on: October 13, 2010, 09:50:21 pm »
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

  • Posts: 3815
  • Turrets: +147/-187
Re: Percentage of Energy?
« Reply #1 on: October 19, 2010, 03:40:45 pm »
Check the GPP HUD and look at the charge bars.
U R A Q T

OhaiReapd

  • Guest
Re: Percentage of Energy?
« Reply #2 on: October 20, 2010, 04:57:21 am »
Check the GPP HUD and look at the charge bars.

The standard one? Hmmm.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Percentage of Energy?
« Reply #3 on: October 20, 2010, 03:32:17 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

  • Posts: 740
  • Turrets: +16/-26
Re: Percentage of Energy?
« Reply #4 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.
"Any sufficiently advanced stupidity is indistinguishable from malice." -- Grey's Law


OhaiReapd

  • Guest
Re: Percentage of Energy?
« Reply #5 on: October 21, 2010, 12:14:03 pm »
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

  • Posts: 3815
  • Turrets: +147/-187
Re: Percentage of Energy?
« Reply #6 on: October 21, 2010, 05:44:27 pm »
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

  • Posts: 1198
  • Turrets: +157/-64
Re: Percentage of Energy?
« Reply #7 on: October 21, 2010, 08:12:19 pm »
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/
my brain > your brain.
and i am VERY stupid.

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Re: Percentage of Energy?
« Reply #8 on: October 21, 2010, 08:57:28 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

  • Guest
Re: Percentage of Energy?
« Reply #9 on: October 21, 2010, 09:12:52 pm »
I have a way to make a bar. But it's not what I want.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Percentage of Energy?
« Reply #10 on: October 22, 2010, 01:01:05 am »
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

  • Guest
Re: Percentage of Energy?
« Reply #11 on: October 22, 2010, 10:43:51 am »
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

  • Posts: 3815
  • Turrets: +147/-187
Re: Percentage of Energy?
« Reply #12 on: October 22, 2010, 06:39:53 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

  • Guest
Re: Percentage of Energy?
« Reply #13 on: October 27, 2010, 09:31:49 am »
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.