Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
help pls
CoD2 Scripting
Rainbow HELP....
CoD4 MP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: More values in one HUD
kelik
General Member
Since: Jan 2, 2011
Posts: 13
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Jun. 20, 2012 02:51 pm
When I was learning about HUDs I found on this forum interesting form of presentation values in HUDs:
Code:
string=&"You have &&1 health left";
precachestring(string);
hud.label=string;
hud setvalue(self.health);


I was wondering, if it is possible to insert more values in one HUD, for example:
Code:
string=&"You have &&1 health left, and &&2 ammo and &&3 frags";


So, is it possible? If yes, how to change/update each value?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Wednesday, Jun. 20, 2012 03:05 pm
No, not possible.
Needs multiple hud elements, or use a cvar in hud.menu then update that cvar.
Share |
kelik
General Member
Since: Jan 2, 2011
Posts: 13
Last: Dec 8, 2012
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Jun. 20, 2012 03:08 pm
Aww, that's a shame. Thank you for reply. :)
Share |
z0d
General Member
Since: Apr 29, 2012
Posts: 33
Last: May 8, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Thursday, Jun. 21, 2012 03:43 am
what's the problem with two hud elements? u can make them appear/disappear at same time...
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Jun. 21, 2012 05:09 am
z0d writes...
Quote:
what's the problem with two hud elements? u can make them appear/disappear at same time...


no ofc its not a problem. but eventually all these huds will add up and reach its hud limit and they will start appearing/disappearing randomly. so if you know your going to have alot of huds its good to try your best to squeeze it all in 1 like kelik is trying to do. i think the max hud limit is around 16? maybe less im not 100% sure on that one.
Share |
Rezil
General Member
Since: Aug 25, 2006
Posts: 30
Last: Apr 10, 2013
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Friday, Jun. 22, 2012 07:02 am
The HUD limit is around 32 minus the elements already set by the gametype. I tested displaying a simple white shader box in a loop and got to 27ish.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Why console gaming is dying
Quote:Consider this: Dedicated gaming sales — including living-room consoles...
Devs: Games are being dumb...
Click 'read more' to view the contents of this post.
Loadout
Gun Crafting to the Max. edited on Sep. 25, 2012 06:57 pm by Morp...
Introducing the Source Fil...
Surprised this wasn't made a long time ago. Sounds like a nice little feature.
Introducing the Source Fil...
The Source Filmmaker (SFM) is the movie-making tool built and used by us he...

Partners & Friends

»