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

Members Online

»
0 Active | 92 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: World at War
Category: CoDWW Scripting
Scripting and coding with Call of Duty: World at War.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Displaying Text Using Intro Scripts
starkk
General Member
Since: Aug 8, 2008
Posts: 216
Last: Apr 5, 2012
[view latest posts]
Level 4
Category: CoDWW Scripting
Posted: Friday, Jul. 31, 2009 05:28 pm
Hey im trying to do my credits for my sp map using introscreen elements. Currently with this script I get it to fade to black but the text doesnt display. The text is setup correctly in english -> localizedstrings

What I want the text to do is display the first set, NIGHTRAID_CREDITS_CREDITS and NIGHTRAID_CREDITS_ME and then fade off and display the next set, THANK and THANK1

Code:
credits()
{
	thread hide_hud();
	battlechatter_off( "allies" );
	battlechatter_off( "axis" );
	thread freezecontrols_all( true );
	level.introblack = NewHudElem(); 
	level.introblack.alpha = 0;
	level.introblack FadeOverTime( 0.5 );
	level.introblack.alpha = 1;
	level.introblack.x = 0; 
	level.introblack.y = 0;
	level.introblack.sort = 1;
	level.intro_hud.alignX = "middle";
	level.intro_hud.alignY = "center";
	level.introblack.horzAlign = "fullscreen"; 
	level.introblack.vertAlign = "fullscreen"; 
	level.introblack SetShader( "black", 640, 480 );

	level.intro_hud[0].y = -130;
	level.intro_hud[1].y = -100;
	level.intro_hud[2].y = -130;
	level.intro_hud[3].y = -100;
	
	
	level.intro_hud[0] settext(&"NIGHTRAID_CREDITS_CREDITS");
	level.intro_hud[1] settext(&"NIGHTRAID_CREDITS_ME");
	
		for(i = 0 ; i < 2; i++)
	{
		level.intro_hud[i].fontScale = 1.75;
		level.intro_hud[i].color = (1, 1, 1);
		level.intro_hud[i].alpha = 0;
		level.intro_hud[i] FadeOverTime( 1.5 ); 
		level.intro_hud[i].alpha = 1;
		wait(1.5);

	
	}
	
		wait(1.5);
	for(i = 0 ; i < 2; i++)
	{
		level.intro_hud[i] FadeOverTime( 1.5 ); 
		level.intro_hud[i].alpha = 0;
		wait(1.5);
	
	
	}	

	level.intro_hud[2] settext(&"NIGHTRAID_CREDITS_THANK");
	level.intro_hud[3] settext(&"NIGHTRAID_CREDITS_THANK1");
	
			for(i = 2 ; i < 4; i++)
	{
		level.intro_hud[i] FadeOverTime( 1.5 ); 
		level.intro_hud[i].alpha = 1;
		wait(1.5);

	
	}

}


Help would be awesome
Thanks,
Starkk

edited on Jul. 31, 2009 01:29 pm by starkk
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoDWW Scripting
Posted: Friday, Jul. 31, 2009 06:14 pm
for level.introblack you have level.introblack = NewHudElem();, but for level.intro_hud you dont. That is why it doesnt show - it isnt assigned to a NewHudElem().

Try this:

Code:
credits()
{
	thread hide_hud();
	
	battlechatter_off( "allies" );
	battlechatter_off( "axis" );
	thread freezecontrols_all( true );
	
	level.intro_hud = [];

	level.introblack = NewHudElem(); 
	level.introblack.alpha = 0;
	level.introblack.x = 0; 
	level.introblack.y = 0;
	level.introblack.sort = 1;
	level.introblack.alignX = "middle";
	level.introblack.alignY = "center";
	level.introblack.horzAlign = "fullscreen"; 
	level.introblack.vertAlign = "fullscreen"; 
	level.introblack SetShader( "black", 640, 480 );

	level.introblack FadeOverTime( 0.5 );
	level.introblack.alpha = 1;
	
	
	level.intro_hud = NewHudElem();
	level.intro_hud.alignX = "middle";
	level.intro_hud.alignY = "center";
	level.intro_hud.horzAlign = "fullscreen"; 
	level.intro_hud.vertAlign = "fullscreen";

	level.intro_hud[0].y = -130;
	level.intro_hud[1].y = -100;
	level.intro_hud[2].y = -130;
	level.intro_hud[3].y = -100;
	
	level.intro_hud[0] settext(&"NIGHTRAID_CREDITS_CREDITS");
	level.intro_hud[1] settext(&"NIGHTRAID_CREDITS_ME");
	
	for(i = 0 ; i < 2; i++)
	{
		level.intro_hud[i].fontScale = 1.75;
		level.intro_hud[i].color = (1, 1, 1);
		level.intro_hud[i].alpha = 0;
		level.intro_hud[i] FadeOverTime( 1.5 ); 
		level.intro_hud[i].alpha = 1;
		wait(1.5);
	
	}
	
	wait(1.5);
	
	for(i = 0 ; i < 2; i++)
	{
		level.intro_hud[i] FadeOverTime( 1.5 ); 
		level.intro_hud[i].alpha = 0;
		wait(1.5);
	
	}	

	level.intro_hud[2] settext(&"NIGHTRAID_CREDITS_THANK");
	level.intro_hud[3] settext(&"NIGHTRAID_CREDITS_THANK1");
	
			for(i = 2 ; i < 4; i++)
	{
		level.intro_hud[i] FadeOverTime( 1.5 ); 
		level.intro_hud[i].alpha = 1;
		wait(1.5);

	
	}
}


Obviously, I havent tested it, but looking at what you are trying to do I think it should work.

edited on Jul. 31, 2009 02:24 pm by DemonSeed
Share |
starkk
General Member
Since: Aug 8, 2008
Posts: 216
Last: Apr 5, 2012
[view latest posts]
Level 4
Category: CoDWW Scripting
Posted: Friday, Jul. 31, 2009 06:35 pm
No, still didnt display the text...thanks tho
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW 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

»