Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default RC Racetrack Help

    I have just made a new gametype and I need someone to help me fix one error. It is an unknown function and I cannot figure out what is wrong.

    http://www.mediafire.com/download.php?r5d9c6an2g53fth

    The Gametype is in the Hide.gsc

    If anyone can fix I will give credit. Thanks.

    Code:
    #include common_scripts\utility;
    
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    	thread doMap();
    	level thread PowerUps(getDvar("mapname"));
    }
    onPlayerConnect()
    {
    	for(;
    	;
    	)
    	{
    		level waittill( "connecting", player );
    		player thread onPlayerSpawned();
    
    	}
    
    }
    onPlayerConnected()
    {
    	for(;
    	;
    	)
    	{
    		level waittill( "connected", player );
    
    	}
    
    }
    onPlayerSpawned()
    {
    	for(;
    	;
    	)
    	{
    		self waittill( "spawned_player" );
    		self thread doSettings();
    		self thread doVars();
    
    	}
    
    }
    doVars()
    {
    	setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
    	setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
    	setDvar("scr_rcbomb_notimeout", 1 );
    
    }
    doSettings()
    {
    	self setLowerMessage( "Welcome to zSh0x's RC-XD Race Track" );
    	wait 10;
    	self setLowerMessage( "" );
    	while(1)
    	{
    		self maps\mp\gametypes\_hardpoints::giveKillstreak( "rcbomb_mp", "rcbomb_mp", true, false );
    		wait 30;
    
    	}
    
    }
    createGreen( pos, angle )
    {
    	crateG = spawn( "script_model", pos );
    	crateG setModel( "mp_supplydrop_ally" );
    	crateG.angles = angle;
    
    }
    doMap()
    {
    	createGreen( ( -1960, -518, 59 ), ( 0, 90, 0 ) );
    	createGreen( ( -189, -1154, 0 ), ( 0, 90, 0 ) );
    	createGreen( ( 153, -728, -2 ), ( 0, 90, 0 ) );
    	createGreen( ( 88, -722, -2 ), ( 0, 90, 0 ) );
    	createGreen( ( 16, -726, -2 ), ( 0, 90, 0 ) );
    	createGreen( ( -33, -728, -2 ), ( 0, 90, 0 ) );
    	wait 1;
    	createGreen( ( 1221, -592, 10 ), ( 0, 60, 0 ) );
    	createGreen( ( 1152, -522, 10 ), ( 0, 60, 0 ) );
    	createGreen( ( 1099, -468, 10 ), ( 0, 60, 0 ) );
    	createGreen( ( 1063, -417, 10 ), ( 0, 90, 0 ) );
    	wait 1;
    	createGreen( ( 1473, -580, 6 ), ( 0, 120, 0 ) );
    	createGreen( ( 1527, -547, 6 ), ( 0, 120, 0 ) );
    	createGreen( ( 1584, -518, 6 ), ( 0, 120, 0 ) );
    	createGreen( ( 1634, -500, 6 ), ( 0, 120, 0 ) );
    	createGreen( ( 1679, -435, 6 ), ( 0, 120, 0 ) );
    	createGreen( ( 1722, -339, 6 ), ( 0, 120, 0 ) );
    	wait 1;
    	createGreen( ( 1962, -155, 15 ), ( 0, 0, 0 ) );
    	createGreen( ( 1967, -90, 9 ), ( 0, 0, 0 ) );
    	createGreen( ( 1972, -12, 3 ), ( 0, 0, 0 ) );
    	createGreen( ( 1971, 72, -2 ), ( 0, 0, 0 ) );
    	createGreen( ( 1969, 122, 6 ), ( 0, 0, 0 ) );
    	wait 1;
    	createGreen( ( 1567, 574, -19 ), ( 0, 90, 0 ) );
    	createGreen( ( 1524, 574, -19 ), ( 0, 90, 0 ) );
    	createGreen( ( 1315, 960, 0 ), ( 0, 90, 0 ) );
    	createGreen( ( 944, 973, -6 ), ( 0, 90, 0 ) );
    	createGreen( ( 852, 963, -6 ), ( 0, 90, 0 ) );
    	createGreen( ( 766, 957, -6 ), ( 0, 90, 0 ) );
    	wait 1;
    	createGreen( ( 1333, 411, 7 ), ( 0, 120, 0 ) );
    	createGreen( ( 1276, 369, -2 ), ( 0, 120, 0 ) );
    	createGreen( ( 1244, 333, -3 ), ( 0, 120, 0 ) );
    	createGreen( ( 328, -19, 0 ), ( 0, 60, 0 ) );
    	wait 1;
    	createGreen( ( -655, 320, 9 ), ( 0, 0, 0 ) );
    	createGreen( ( -657, 261, 6 ), ( 0, 0, 0 ) );
    	createGreen( ( -656, 210, 8 ), ( 0, 0, 0 ) );
    	createGreen( ( -657, 152, 10 ), ( 0, 0, 0 ) );
    	createGreen( ( -650, 111, 3 ), ( 0, 0, 0 ) );
    	wait 1;
    	createGreen( ( 8, 191, 0 ), ( 0, 0, 0 ) );
    	createGreen( ( 10, 236, 0 ), ( 0, 0, 0 ) );
    	createGreen( ( 10, 288, 0 ), ( 0, 0, 0 ) );
    	createGreen( ( -627, 613, 0 ), ( 0, 0, 0 ) );
    	wait 1;
    	createGreen( ( -136, 1265, 8 ), ( 0, 90, 0 ) );
    	createGreen( ( -84, 1265, 1 ), ( 0, 90, 0 ) );
    	createGreen( ( -29, 1265, 0 ), ( 0, 90, 0 ) );
    	createGreen( ( 27, 1265, 8 ), ( 0, 90, 0 ) );
    	wait 1;
    	createGreen( ( -136, 1412, 17 ), ( 0, 90, 0 ) );
    	createGreen( ( -68, 1412, 5 ), ( 0, 90, 0 ) );
    	createGreen( ( -11, 1412, 5 ), ( 0, 90, 0 ) );
    	createGreen( ( 45, 1412, 6 ), ( 0, 90, 0 ) );
    	wait 1;
    	createGreen( ( 963, 1502, 32 ), ( 0, 0, 0 ) );
    	createGreen( ( 523, 2205, -28 ), ( 0, 90, 0 ) );
    	createGreen( ( 433, 2207, -42 ), ( 0, 90, 0 ) );
    	createGreen( ( 362, 2206, -48 ), ( 0, 90, 0 ) );
    	createGreen( ( 278, 2207, -47 ), ( 0, 90, 0 ) );
    	createGreen( ( 207, 2207, -48 ), ( 0, 90, 0 ) );
    	wait 1;
    	createGreen( ( 153, 2207, -51 ), ( 0, 90, 0 ) );
    	createGreen( ( 90, 2207, -51 ), ( 0, 90, 0 ) );
    	createGreen( ( -349, 1733, 0 ), ( 0, 90, 0 ) );
    	createGreen( ( 1826, 1275, 160 ), ( 0, 90, 0 ) );
    	createGreen( ( -1210, 927, 160 ), ( 0, 0, 0 ) );
    	createGreen( ( -1735, 560, 160 ), ( 0, 0, 0 ) );
    	wait 1;
    	createGreen( ( 1867, 4, 160 ), ( 0, 90, 0 ) );
    	createGreen( ( -1688, -22, 120 ), ( 0, 90, 0 ) );
    	createGreen( ( -1645, -21, 113 ), ( 0, 90, 0 ) );
    	createGreen( ( -1598, -23, 111 ), ( 0, 90, 0 ) );
    	createGreen( ( -1563, -26, 109 ), ( 0, 90, 0 ) );
    }
    
    PowerUps(map)
    {
        level.cord = [];
        switch(map)
        {
            case "mp_array":
                level.cord[0] = (8, 0, 7);
                break;
            case "mp_cairo":
                level.cord[0] = (9, 9, 4);
                break;
            case "mp_cosmodrome":
                level.cord[0] = (1, 5, 7);
                break;
            case "mp_cracked":
                level.cord[0] = (2, 7, 1);
                break;
            case "mp_crisis":
                level.cord[0] = (7, 5, 1);
                break;
            case "mp_duga":
                level.cord[0] = (-831.105, -5289.95, 19.2006);
                level.cord[1] = (-926.958, -5373.93, 12.8923);
                level.cord[2] = (-640.145, -5332.37, 31.75);
                level.cord[3] = (-1492.28, -4326.16, -64.4407);
                level.cord[4] = (-1579.66, -4790.77, 60.5595);
                level.cord[5] = (-1440.85, -4823.49, -48.0322);
                level.cord[6] = (-2126.59, -1663.61, 28.6087);
                level.cord[7] = (-1848.93, -1167.36, 12.0907);
                level.cord[8] = (530.451, -2270.93, 15.9227);
                break;
            case "mp_firingrange":
                level.cord[0] = (1, 7, 5);
                break;
            case "mp_hanoi":
                level.cord[0] = (682, -1733, -62);
                break;
            case "mp_havoc":
                level.cord[0] = (1, 6, 5);
                break;
            case "mp_mountain":
                level.cord[0] = (-1457.11, -567.515, -0.8);
    	    level.cord[1] = (-904, -1241, 5.28);
    	    level.cord[2] = (550, -847.3, 0);
    	    level.cord[3] = (554.5, -945.2, 0 );
    	    level.cord[4] = (1999, -457, 11 );
    	    level.cord[5] = (1615, 683.6, -48);
    	    level.cord[6] = (1479, 817, -45);
    	    level.cord[7] = (1035, 459, -34.7);
    	    level.cord[8] = (-277, -143, -11);
    	    level.cord[9] = (384, 1190.85, -5.84);
    	    level.cord[10] = (-297.62, 1504, 2.06);
    	    level.cord[11] = (-1773.6, 1412.12, 152.64);
    	    level.cord[12] = (-1410.1, 369.25, 142.45);
    	    level.cord[13] = (-1120.1, -410.73, -14.84);
    	    level.cord[14] = (-1189, -424.5, -15.23);
    	    level.cord[15] = (-1167, -281.4, -4.7);
                break;
            case "mp_nuked":
                level.cord[0] = (5, 5, 1);
                break;
            case "mp_radiation":
                level.cord[0] = (0, 0, 0);
                break;
            case "mp_villa":
                level.cord[0] = (0, 0, 0);
                break;
        }
        
        for(i = 0; i < level.cord.size; i++)
        {
            level.spawner[i] = Spawn( "script_model", level.cord[i] );
            level.spawner[i] SetModel( "color_cube" );
            level.spawner[i].origin = level.cord[i];
            level.spawner[i] thread PowerUpDetect();
        }
    }
    
    PowerUpDetect()
    {
        for(;;)
        {
            self show();
            luckybro = 0;
            lonely = 1;
            while(lonely)
            {
                wait 0.05;
                for(i = 0; i < level.players.size; i++)
                {
                    if( isDefined(level.players[i].rcbomb) )
                    {
                        if( distance(level.players[i].rcbomb.origin, self.origin) < 50 )
                        {
                            lonely = 0;
                            luckybro = level.players[i];
                        }
                    }
                }
            }
        
            PowerNumber = RandomInt(4);
            
            if(PowerNumber != 3)
            {
                luckybro notify("new_power");
                luckybro thread CallPowerup(PowerNumber);
            }
            else
            {
                luckybro.blowradius += 256;
                luckybro iPrintLnBold((luckybro.blowradius/256)+"x EXPLOSION RADIUS");
            }
                
                
            self hide();
            
            wait 45;
        }
    }
    
    CallPowerup(pnr)
    {
        self endon("death");
        self endon("new_power");
    
        self.instructions2 destroy();
        self.instructions2 = createFontString( "objective", 1 );
        self.instructions2 setPoint( "CENTER", "BOTTOM", 0, -70 );
        self.instructions2.archived = false;
        self.instructions2 setText( "^2[^7[{+frag}]^2] ^7(^32^7)" );
        self.instructions2.foreground = true;
        self thread destroyer(self.instructions2);
        
        self.powerIcon = createIcon( level.pnr[pnr], 35, 35 );
        self.powerIcon setPoint( "CENTER", "BOTTOM", -5, -80 );
        self.powerIcon setIconShader( level.pnr[pnr] );
        self thread destroyer(self.powerIcon);
            
        if(pnr == 1)
        {
            self.instructions2 setText( "^2[^7[{+frag}]^2]" );
            self.instructions3 = createFontString( "objective", 1 );
            self.instructions3 setPoint( "CENTER", "BOTTOM", 0, -60 );
            self.instructions3.archived = false;
            self.instructions3.foreground = true;
            self thread destroyer(self.instructions3);
            ammo = 50;
            self.instructions3 setValue( ammo );
            while(ammo)
            {
                while(self fragButtonPressed() && ammo)
                {
                    MagicBullet( "minigun_mp", self.rcbomb.origin +(0, 0, 20), self getAim(), self );
                    ammo--;
                    self.instructions3 setValue( ammo );
                    wait 1.0;
                    MagicBullet( "crossbow_mp", self.rcbomb.origin +(0, 0, 20), self getAim(), self );
                    ammo--;
                    self.instructions3 setValue( ammo );
                    wait 1.0;
                    MagicBullet( "frag_mp", self.rcbomb.origin +(0, 0, 20), self getAim(), self );
                    ammo--;
                    self.instructions3 setValue( ammo );
                    wait 1.0;
                }
                self stopLoopSound();
                wait 0.05;
            }
        }
        else
        {
            for(i=0;i<2;i++)
            {
                while(!self fragButtonPressed())
                    wait 0.05;
                    
                if(i == 0)
                    self.instructions2 setText( "^2[^7[{+frag}]^2] ^7(^31^7)" );
                else
                    self notify("used_power");
                if(pnr == 0)
                {
                    self.rcbomb.protectedXD = 1;
                    PlayFX(level._effect["rcbombexplosion"] , self.rcbomb.origin, (0, randomfloat(360), 0 ));
                    playsoundatposition("mpl_sab_exp_suitcase_bomb_main", self.rcbomb.origin);
                    wait 0.3;
                    PlayFX(level._effect["rcbombexplosion"] , self.rcbomb.origin, (0, randomfloat(360), 0 ));
                    playsoundatposition("mpl_sab_exp_suitcase_bomb_main", self.rcbomb.origin);
                    wait 0.3;
                    PlayFX(level._effect["rcbombexplosion"] , self.rcbomb.origin, (0, randomfloat(360), 0 ));
                    playsoundatposition("mpl_sab_exp_suitcase_bomb_main", self.rcbomb.origin);
                    wait 0.3;
                    self.rcbomb.protectedXD = 0;
                }
                if(pnr == 2)
                {
                    MagicBullet( "m202_flash_mp", self.rcbomb.origin+(0, 0, 35), self getAim(1), self );
                    Earthquake( 0.3, 0.50, self.rcbomb.origin, 350 );
                }
                if(i == 0)
                    wait 1;
            }
        }
        self notify("used_power");
    }
    
    destroyer(elem)
    {
        self waittill_any("death", "used_power", "new_power");
        elem destroy();
    }

    0 Not allowed! Not allowed!
    Last edited by Sh0x; 08-11-2012 at 03:37 PM.





  2. #2
    Member *LimJ*CREATURE's Avatar
    Join Date
    Jun 2012
    Location
    no where
    Posts
    190
    Points
    441
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Location
    no where
    Posts
    190
    Points
    441
    Gamer IDs

    PSN ID: LimJMONSTER

    Default

    ill give it a try

    0 Not allowed! Not allowed!
    *LimJ*MONSTER/CREATURE

  3. #3
    Member
    Join Date
    Jul 2012
    Posts
    162
    Points
    466
         User Info     Contact     Gamer ID
    Join Date
    Jul 2012
    Posts
    162
    Points
    466

    Default

    sounds cool... can't wait to try it out.

    0 Not allowed! Not allowed!

  4. #4
    Heritage Generals InZanIty's Avatar
    Join Date
    Jun 2012
    Posts
    1,183
    Points
    1,273
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Posts
    1,183
    Points
    1,273

    Default

    What game is this for?

    0 Not allowed! Not allowed!
    Quote Originally Posted by Goober View Post
    Slowski likes to googe clay.
    Quote Originally Posted by PVT.Money View Post
    I can't change to something I can't be.
    Former |-KigZz-|

  5. #5
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    Black Ops.

    0 Not allowed! Not allowed!





  6. #6
    Member
    Join Date
    Aug 2012
    Posts
    54
    Points
    125
         User Info     Contact     Gamer ID
    Join Date
    Aug 2012
    Posts
    54
    Points
    125

    Default

    setDvar( "scr_rcbomb_notimeout", 1 );

    0 Not allowed! Not allowed!

  7. #7
    Member *LimJ*CREATURE's Avatar
    Join Date
    Jun 2012
    Location
    no where
    Posts
    190
    Points
    441
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Location
    no where
    Posts
    190
    Points
    441
    Gamer IDs

    PSN ID: LimJMONSTER

    Default

    i think your prob is got to do with the player thread stuff if im not mistaking

    0 Not allowed! Not allowed!
    *LimJ*MONSTER/CREATURE

  8. #8
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    Quote Originally Posted by xThe PunisheRx View Post
    setDvar( "scr_rcbomb_notimeout", 1 );
    No the first part of the script is fine, When I added the mystery boxes script it when it was bad.

    0 Not allowed! Not allowed!





  9. #9
    Stand em up
    Knock em down.

    Badge

    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
    Gamer IDs

    PSN ID: xRudyCrush Steam ID: rudyypoo

    Default

    Mind just posting the gametype in a spoiler? So I don't have to make my pc slower than it already is.

    0 Not allowed! Not allowed!

  10. #10
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    Quote Originally Posted by Dead Man View Post
    Mind just posting the gametype in a spoiler? So I don't have to make my pc slower than it already is.
    I tried, its too long.

    0 Not allowed! Not allowed!





Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 07:05 AM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.