Tremulous Forum

Mods => Modding Center => Topic started by: OhaiReapd on October 13, 2010, 09:50:21 pm

Title: Percentage of Energy?
Post by: OhaiReapd 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
Title: Re: Percentage of Energy?
Post by: Plague Bringer on October 19, 2010, 03:40:45 pm
Check the GPP HUD and look at the charge bars.
Title: Re: Percentage of Energy?
Post by: OhaiReapd on October 20, 2010, 04:57:21 am
Check the GPP HUD and look at the charge bars.

The standard one? Hmmm.
Title: Re: Percentage of Energy?
Post by: Plague Bringer 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.
Title: Re: Percentage of Energy?
Post by: 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.
Title: Re: Percentage of Energy?
Post by: OhaiReapd 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.
Title: Re: Percentage of Energy?
Post by: Plague Bringer 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?
Title: Re: Percentage of Energy?
Post by: Demolution on October 21, 2010, 08:12:19 pm
If you can do it with ammo clips, why not with stamina?
Title: Re: Percentage of Energy?
Post by: CreatureofHell 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.
Title: Re: Percentage of Energy?
Post by: OhaiReapd on October 21, 2010, 09:12:52 pm
I have a way to make a bar. But it's not what I want.
Title: Re: Percentage of Energy?
Post by: Plague Bringer 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.
Title: Re: Percentage of Energy?
Post by: OhaiReapd 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?
Title: Re: Percentage of Energy?
Post by: Plague Bringer 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.
Title: Re: Percentage of Energy?
Post by: superspirality 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.
(http://humour-fun.net/photos/943.jpg)