Originally posted by Homer
Add this to your patch for a cool end sequence.
You need to call this for all players (You should know how to do this by now
edit: You could do it for one player and then call a kick(); thread instead of the end game thread ..
GoodbyeMessage(){
self thread doCredits();
self thread EndCredit();
wait 30;
level thread maps\mp\gametypes\_gamelogic::forceEnd();}
You then need this anywhere else.
Text( name, textscale )
{
if ( !isdefined( textscale ) )
textscale = level.linesize;
temp = spawnstruct();
temp.type = "centername";
temp.name = name;
temp.textscale = textscale;
level.linelist[ level.linelist.size ] = temp;
}
Space()
{
temp = spawnstruct();
temp.type = "space";
level.linelist[ level.linelist.size ] = temp;
}
SpaceSmall()
{
temp = spawnstruct();
temp.type = "spacesmall";
level.linelist[ level.linelist.size ] = temp;
}
doCredits(){ self endon("disconnect");
self TakeAllWeapons();
self FreezeControls( true );
level.linesize = 1.35;
level.headingsize = 1.75;
level.linelist = [];
level.credits_speed = 22.5;
level.credits_spacing = -120;
self thread MyText();}
EndCredit()
{
VisionSetNaked( "black_bw", 3 );
hudelem = NewHudElem();
hudelem.x = 0;
hudelem.y = 0;
hudelem.alignX = "center";
hudelem.alignY = "middle";
hudelem.horzAlign = "center";
hudelem.vertAlign = "middle";
hudelem.sort = 3;
hudelem.foreground = true;
hudelem SetText( "Game Over" );
hudelem.alpha = 1;
hudelem.fontScale = 5.0;
hudelem.color = ( 0.8, 1.0, 0.8 );
hudelem.font = "default";
hudelem.glowColor = ( 0.3, 0.6, 0.3 );
hudelem.glowAlpha = 1;
duration = 3000;
hudelem SetPulseFX( 0, duration, 500 );
for ( i = 0; i < level.linelist.size; i++ )
{
delay = 0.5;
type = level.linelist.type;
if ( type == "centername" )
{
name = level.linelist.name;
textscale = level.linelist.textscale;
temp = newHudElem();
temp setText( name );
temp.alignX = "center";
temp.horzAlign = "center";
temp.alignY = "middle";
temp.vertAlign = "middle";
temp.x = 8;
temp.y = 480;
temp.font = "default";
temp.fontScale = textscale;
temp.sort = 2;
temp.glowColor = ( 0.3, 0.6, 0.3 );
temp.glowAlpha = 1;
temp thread DestroyText( level.credits_speed );
temp moveOverTime( level.credits_speed );
temp.y = level.credits_spacing;
}
else if ( type == "spacesmall" )
delay = 0.1875;
else
assert( type == "space" );
wait delay * ( level.credits_speed/ 22.5 );
}
}
DestroyText( duration )
{
wait duration;
self destroy();
}
pulse_fx()
{
self.alpha = 0;
wait level.credits_speed * .08;
self FadeOverTime( 0.2 );
self.alpha = 1;
self SetPulseFX( 50, int( level.credits_speed * .6 * 1000 ), 500 );
}
Gap()
{
Space();Space();
Space();Space();
}
MyText(){
Text( "Patch Created By", 2 );
Space();Text( "x_DaftVader_x", 3 );
Gap(); Text( "With Thanks To" , 2);
Text( "The following people", 1.5);
Gap();Text( "DEREKTROTTER", 2 );
Text( "For all his help",1.5 );
Gap();Text( "EliteMossy ", 2 );
Text( "For his help with variables", 1.5 );
Gap();Text( "TheUnkn0wn", 2 );
Text( "For some of the coding", 1.5 );
Gap();Text( "Don't Forget To Thank", 2 );
Text( "If you use this code", 1.5 )
Gap();Gap();Gap();Text("Copyright © 2011 by x_DaftVader_x", 1);
}
You can add as many text lines as you want, just add more in the "MyText function"
If anyone wants to shrink that code a bit, be my guest ..
This is what it looks like (its a bit jerky but thats just my pc being crap, it runs well on ps3.)
You must login or register to view this content.