Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Splash MW3-Like
#1
Hello, i hone nobody made this before me Smile

Dont read what i wrote in the splash cuz when i recorded the video i was sleeping on my seat Big Grin


Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

/*
    SplashCard MW3-Like
    
    Created by Puffiamo
    Steam: Puffiamo94
*/

Splash( whoCall, whatHeDo, team )
{
    level.tempo = 4;
    j=0;
    k=0;
    
    if (level.splashinlevel < 0 || level.splashinlevel > 12)
        level.splashinlevel = 5;
        
    switch( level.splashinlevel )
    {
        case 0: j = -80-(13*10); k = j+13; break;
        case 1: j = -80-(13*8); k = j+13; break;
        case 2: j = -80-(13*6); k = j+13; break;
        case 3: j = -80-(13*4); k = j+13; break;
        case 4: j = -80-(13*2); k = j+13; break;
        case 5: j = -80; k = j+13; break;                //Standard
        case 6: j = -80+(13*2)+2; k = j+13; break;
        case 7: j = -80+(13*4)+2; k = j+13; break;
        case 8: j = -80+(13*6)+2; k = j+13; break;
        case 9: j = -80+(13*8)+2; k = j+13; break;
        case 10: j = -80+(13*10)+2; k = j+13; break;
        case 11: j = -80+(13*12)+2; k = j+13; break;
        case 12: j = -80+(13*14)+2; k = j+13; break;
    }
    level.splashinlevel += 1;
    foreach( player in level.players )
    {
        if( IsDefined( team ) )
        {
            if( team == player.team )
            {
                player thread playerName( whoCall, j );
                player thread playerdo( whatHeDo, k );
                player PlayLocalSound( "mp_war_objective_taken" );
            }
        }
            else
        {
            player thread playerName( whoCall, j );
            player thread playerdo( whatHeDo, k );
            player PlayLocalSound( "mp_war_objective_taken" );
        }
    }

    wait level.tempo;
    level.splashinlevel -= 4;
}

playerName( pname, j )
{
    playername = self createFontString( "objective", 2 );
    playername.foreground = false;
    playername.fontScale = 0.9;
    playername.font = "hudbig";
    playername.alpha = 1;
    playername.glow = 1;
    playername.glowColor = ( 1, 0, 0 );
    playername.glowAlpha = 1;
    playername.color = ( 1.0, 1.0, 1.0 );
    playername setText( pname );
    i=200;
    while(i>=0)
    {
        playername setPoint( "RIGHT", "RIGHT", i, j );
        i-=20;
        wait 0.00001;
    }
    wait level.tempo;
    playername Destroy();
}

playerDo( cosa_fa, k )
{
    playerdo = self createFontString( "objective", 2 );
    playerdo.foreground = false;
    playerdo.fontScale = 0.7;
    playerdo.font = "hudbig";
    playerdo.alpha = 1;
    playerdo.glow = 1;
    playerdo.glowColor = ( 0, 0, 1 );
    playerdo.glowAlpha = 1;
    playerdo.color = ( 1.0, 1.0, 1.0 );
    playerdo setText( cosa_fa );
    i=200;
    while(i>=0)
    {
        playerdo setPoint( "RIGHT", "RIGHT", i, k );
        i-=20;
        wait 0.00001;
    }
    wait level.tempo;
    playerdo Destroy();
}

How to use it?
You have to add in the 1st parameter the name of the player, in the 2nd parameter what the player do and the 3rd is optional if you add a team, only that team will read the splash!

PS: Sometimes if there are many splash at the same time they might overlap, if someone want fix this, public the modify below Smile
My Reputation is low, help me with +1 rep if i helped you! Big Grin
Reply

#2
nice work Big Grin
Reply

#3
Sad

You make awesome things, but yet they're already made Tongue

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tutorial] Splash screen Arteq 1 1,738 02-05-2012, 19:51
Last Post: JariZ

Forum Jump:


Users browsing this thread:
3 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.