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

Members Online

»
1 Active | 66 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP 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, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Cvar-based menu (load)bar
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Thursday, Jan. 5, 2012 05:04 pm
Hello everyone [wave]

I have the following question: is it possible to make a (load)bar in a .menu file, which gets filled depending on a cvar?

From the weapon selection .menu I can see how to do a a static (load)bar:

Code:
itemDef
{
	name			"mp40_info"
	visible 		0
	rect			0 0 128 10
	origin			ORIGIN_WEAPONDAMAGE
	backcolor		1 1 1 .125
	style			WINDOW_STYLE_FILLED
	decoration
}
itemDef
{
	name			"mp40_info"
	visible 		0
	rect			0 0 75 10
	origin			ORIGIN_WEAPONDAMAGE
	backcolor		1 1 1 1
	style			WINDOW_STYLE_FILLED
	decoration
}


Like we see, the content of the bar is filled with "rect 0 0 75 10", but, how to make that depending on a cvar?

Kind regards,
Leal

P.D.: (load)bar, because it's a bar filled with something, but not progressively like the map-loading-bar.
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Jan. 5, 2012 06:49 pm
dynamic elements arent possible in cod2 menu's!
you can only show/hide different graphics!
also the loadingbar out of the loadingscreen doesnt work with vars!
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Thursday, Jan. 5, 2012 07:09 pm
Oh, what a shame... I regularly get frustrations with this CoD2 engine xD.

How does this loadbar work then?

Thanks for the quick reply serthy :).
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Jan. 5, 2012 07:57 pm
style WINDOW_STYLE_LOADBAR

or sth like that, nothing more
i tried to add that in a menu in combination with:

dvar scr_testbar

but either nothing happened or it crashes with an error
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Thursday, Jan. 5, 2012 08:28 pm
Thank you for testing.

So the way this loadbar loads is hardcoded? -.-
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, Jan. 5, 2012 10:17 pm
Leal writes...
Quote:
Thank you for testing.

So the way this loadbar loads is hardcoded? -.-


correct, the most you can do is change the image. and i think thats it.
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Thursday, Jan. 5, 2012 11:48 pm
All right then, thank you for your answers serthy and liltc64 :D
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Jan. 6, 2012 12:15 am
make a lot of menu elements, all parts of a bar. Make a dvarlist test or smthing to check if they should be shown. Make one dvar to fill that bar. done.
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: Friday, Jan. 6, 2012 12:20 am
IzNoGoD writes...
Quote:
make a lot of menu elements, all parts of a bar. Make a dvarlist test or smthing to check if they should be shown. Make one dvar to fill that bar. done.


thats actually a really good idea, i dont know why i never thought of that before (maybe cause im a sped) but that idea can still be a pain in the ass but it would work pretty well if you are willing to give a good solid 30-40 mins in the menu.
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Jan. 6, 2012 11:33 am
Great idea IzNoGoD. Thank you :).
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»