09-10-2011, 20:31
(This post was last modified: 09-12-2011, 23:16 by tonymamoni1.)
ok i know the codding slopy and its ma first release but id thought id post this since i saw there was a contest going on
i dont have a pic at the moment but its a sky base that is ment for array that is fuken huge it has a mystery box (tlpwnzer) and a box that gives you death machines
the main thing about it is that it has a elevator that is activated by holding the secondoffhand button
ill upload a vid and its made for wii but should work on pc/sexbox
ok this is the edit for those having trouble with the height being too high just add ur variables in at the bottom under bob.height = and the other bob.height.box number to ur specifics its in da spoiler
i dont have a pic at the moment but its a sky base that is ment for array that is fuken huge it has a mystery box (tlpwnzer) and a box that gives you death machines
the main thing about it is that it has a elevator that is activated by holding the secondoffhand button
ill upload a vid and its made for wii but should work on pc/sexbox
ok this is the edit for those having trouble with the height being too high just add ur variables in at the bottom under bob.height = and the other bob.height.box number to ur specifics its in da spoiler
Spoiler (Click to View)
Code:
#include common_scripts\utility;
#include maps\mp\_airsupport;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
main()
{
thread init();
}
init()
{
thread onPlayerConnect();
thread onPlayerConnected();
thread doMap();
level thread spawnBox();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
player thread doVars();
}
}
onPlayerConnected()
{
for(;;)
{
level waittill( "connected", player );
player thread checkDistance();
player thread giveDeath();
}
}
onPlayerSpawned()
{
for(;;)
{
self waittill( "spawned_player" );
self thread doElevator();
}
}
doMap()
{
level.bunkers[1] = createGreen( ( 1498.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[2] = createGreen( ( 1498.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[3] = createGreen( ( 1498.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[4] = createGreen( ( 1498.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[5] = createGreen( ( 1498.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[6] = createGreen( ( 1498.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[7] = createGreen( ( 1498.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[8] = createGreen( ( 1498.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[9] = createGreen( ( 1498.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[10] = createGreen( ( 1563.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[11] = createGreen( ( 1628.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[12] = createGreen( ( 1693.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[13] = createGreen( ( 1758.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[14] = createGreen( ( 1823.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[15] = createGreen( ( 1888.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[16] = createGreen( ( 1953.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[17] = createGreen( ( 2018.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[18] = createGreen( ( 2083.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[19] = createGreen( ( 2148.76, 717.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[20] = createGreen( ( 1498.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[21] = createGreen( ( 1563.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[22] = createGreen( ( 1628.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[23] = createGreen( ( 1693.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[24] = createGreen( ( 1758.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[25] = createGreen( ( 1823.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[26] = createGreen( ( 1888.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[27] = createGreen( ( 1953.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[28] = createGreen( ( 2018.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[29] = createGreen( ( 2083.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[30] = createGreen( ( 2148.76, 787.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[31] = createGreen( ( 1498.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[32] = createGreen( ( 1563.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[33] = createGreen( ( 1628.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[34] = createGreen( ( 1693.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[35] = createGreen( ( 1758.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[36] = createGreen( ( 1823.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[37] = createGreen( ( 1888.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[38] = createGreen( ( 1953.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[39] = createGreen( ( 2018.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[40] = createGreen( ( 2083.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[41] = createGreen( ( 2148.76, 752.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[42] = createGreen( ( 1498.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[43] = createGreen( ( 1563.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[44] = createGreen( ( 1628.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[45] = createGreen( ( 1693.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[46] = createGreen( ( 1758.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[47] = createGreen( ( 1823.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[48] = createGreen( ( 1888.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[49] = createGreen( ( 1953.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[50] = createGreen( ( 2018.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[51] = createGreen( ( 2083.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[52] = createGreen( ( 2148.76, 822.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[52] = createGreen( ( 1498.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[53] = createGreen( ( 1563.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[54] = createGreen( ( 1628.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[55] = createGreen( ( 1693.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[56] = createGreen( ( 1758.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[57] = createGreen( ( 1823.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[58] = createGreen( ( 1888.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[59] = createGreen( ( 1953.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[60] = createGreen( ( 2018.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[61] = createGreen( ( 2083.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[62] = createGreen( ( 2148.76, 857.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[62] = createGreen( ( 1498.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[63] = createGreen( ( 1563.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[64] = createGreen( ( 1628.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[65] = createGreen( ( 1693.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[66] = createGreen( ( 1758.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[67] = createGreen( ( 1823.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[68] = createGreen( ( 1888.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[69] = createGreen( ( 1953.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[70] = createGreen( ( 2018.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[71] = createGreen( ( 2083.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[72] = createGreen( ( 2148.76, 892.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[72] = createGreen( ( 1498.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[73] = createGreen( ( 1563.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[74] = createGreen( ( 1628.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[75] = createGreen( ( 1693.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[76] = createGreen( ( 1758.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[77] = createGreen( ( 1823.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[78] = createGreen( ( 1888.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[79] = createGreen( ( 1953.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[80] = createGreen( ( 2018.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[81] = createGreen( ( 2083.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[82] = createGreen( ( 2148.76, 927.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[82] = createGreen( ( 1498.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[83] = createGreen( ( 1563.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[84] = createGreen( ( 1628.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[85] = createGreen( ( 1693.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[86] = createGreen( ( 1758.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[87] = createGreen( ( 1823.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[88] = createGreen( ( 1888.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[89] = createGreen( ( 1953.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[90] = createGreen( ( 2018.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[91] = createGreen( ( 2083.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[92] = createGreen( ( 2148.76, 962.474, 2303.125 ), ( 0, 90, 0 ) );
level.bunkers[93] = createdreen( ( 1443.76, 822.474, 2303.125 ), ( 0, 90, 0 ), 1 );
level.bunkers[94] = createdreen( ( 1443.76, 857.474, 2303.125 ), ( 0, 90, 0 ), 2 );
level.bunkers[97] = createdreen( ( 1443.76, 787.474, 2338.125 ), ( 0, 90, 0 ), 3 );
level.bunkers[98] = createdreen( ( 1443.76, 892.474, 2338.125 ), ( 0, 90, 0 ), 4 );
}
createGreen( pos, angle ) // Crate for Miscellanious
{
crateG = spawn( "script_model", pos );
crateG setModel( "mp_supplydrop_ally" );
crateG.angles = angle;
}
Movingdown()
{
level.crateD[1] moveTo( ( 1443.76, 822.474, 323.125 ), 3 );
level.crateD[2] moveTo( ( 1443.76, 857.474, 323.125 ), 3 );
level.crateD[3] moveTo( ( 1443.76, 787.474, 358.125 ), 3 );
level.crateD[4] moveTo( ( 1443.76, 892.474, 358.125 ), 3 );
}
Goingup()
{
level.crateD[1] moveTo( ( 1443.76, 822.474, 2303.125 ), 5 );
level.crateD[2] moveTo( ( 1443.76, 857.474, 2303.125 ), 5 );
level.crateD[3] moveTo( ( 1443.76, 787.474, 2338.125 ), 5 );
level.crateD[4] moveTo( ( 1443.76, 892.474, 2338.125 ), 5 );
}
createdreen( pos, angle, num ) // Crate for Moving Doors
{
level.crateD[num] = spawn( "script_model", pos );
level.crateD[num] setModel( "mp_supplydrop_ally" );
level.crateD[num].angles = angle;
}
doElevator()
{
self.leetohyeah = 1;
self endon("death");
for (;;) {
if (self.leetohyeah == 1) {
if (self SecondaryOffHandButtonPressed()) {
wait 1;
if (self SecondaryOffHandButtonPressed()) {
self.leetohyeah = 0;
self thread Movingdown();
wait 5.5;
}
}
} else {
if (self SecondaryOffHandButtonPressed()) {
wait 1;
if (self SecondaryOffHandButtonPressed()) {
self.leetohyeah = 1;
self thread Goingup();
wait 5;
}
}
}
wait 0.01;
}
}
checkDistance()
{
while( 1 )
{
wait .01;
if( distance( self.origin, level.mBox.origin ) < 75 && level.using == 0 )
{
self setLowerMessage( "Press [{+activate}] for Mystery Box" );
randWeap = randomInt( level.guns.size );
for(;;)
{
if( self useButtonPressed() == true && level.using == 0 && distance( self.origin, level.mBox.origin ) < 75 )
{
level.using = 1;
self clearLowerMessage( 1.0 );
level.mGun show();
level.mGun moveTo( level.mBox.origin + ( 0, 0, 30 ), 1 );
wait .2;
for( i = 0; i < 14; i++ )
{
rander = randomInt( level.guns.size );
level.mGun setModel( GetWeaponModel( level.guns[rander] ) );
wait( 0.025 * i );
}
level.mGun setModel( GetWeaponModel( level.guns[randWeap] ) );
wait .5;
for( i = 0; i < 0.5; i += 0.01 )
{
self setLowerMessage( "Press [{+activate}] to Take The Gun" );
if( self useButtonPressed() == true && distance( self.origin, level.mBox.origin ) < 75 )
{
self clearLowerMessage( 1.0 );
if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
self giveWeapon( level.guns[randWeap] );
self switchToWeapon( level.guns[randWeap] );
self giveMaxAmmo( level.guns[randWeap] );
i = 0.5;
}
else if( distance( self.origin, level.mBox.origin ) > 75 )
{
self clearLowerMessage( 1.0 );
}
wait 0.01;
}
self clearLowerMessage( 1.0 );
level.mGun moveTo( level.mBox.origin, 1 );
wait 1;
level.mGun hide();
level.using = 0;
break;
}
else if( distance( self.origin, level.mBox.origin ) > 75 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else
{
self clearLowerMessage( 1.0 );
}
}
wait 0.01;
}
giveDeath()
{
while( 1 )
{
wait .01;
if( distance( self.origin, level.Death.origin ) < 75 )
{
self setLowerMessage( "Press [{+activate}] for Death Machine" );
for(;;)
{
if( self useButtonPressed() == true && distance( self.origin, level.Death.origin ) < 75 )
{
self clearLowerMessage( 1.0 );
self giveWeapon( "minigun_mp" );
self giveMaxAmmo( "minigun_mp" );
self switchToWeapon( "minigun_mp" );
}
wait 0.01;
}
}
}
}
spawnBox()
{
level.mBox = spawn( "script_model", ( 1498.76, 717.474, 2338.125 ) );
level.mBox setModel( "mp_supplydrop_ally" );
level.mBox.angles = ( 0, 90, 0 );
level.Death = spawn( "script_model", ( 1498.76, 962.474, 2338.125 ) );
level.Death setModel( "mp_supplydrop_ally" );
level.Death.angles = ( 0, 90, 0 );
level.mGun = spawn( "script_model", level.mBox.origin );
level.mGun setModel( GetWeaponModel( "claymore_mp" ) );
level.mGun.angles = level.mBox.angles + ( 0, 90, 0 );
level.mGun hide();
}
doVars()
{
level.using = 0;
self.usingg = 0;
level.guns[0] = "aug_mp";
level.guns[1] = "m16_mp";
level.guns[2] = "spas_mp";
level.guns[3] = "famas_mp";
level.guns[4] = "rpk_mp";
level.guns[5] = "rpg_mp";
level.guns[6] = "m72_law_mp";
level.guns[7] = "commando_mp";
level.guns[8] = "python_mp";
level.guns[9] = "ak74u_mp";
level.guns[10] = "l96a1_mp";
level.guns[11] = "fnfal_mp";
level.guns[12] = "cz75_mp";
level.guns[13] = "spectre_mp";
level.guns[14] = "hk21_mp";
level.guns[15] = "crossbow_explosive_mp";
level.guns[16] = "knife_ballistic_mp";
level.guns[17] = "m60_mp";
level.guns[18] = "stoner63_mp";
}