Post: How to create Bunkers in COD4 no BMP
12-05-2011, 09:19 PM #1
oO-GKUSH-Oo
< ^ > < ^ >
(adsbygoogle = window.adsbygoogle || []).push({}); First I want to say I DONOT take full credit for this.


Ok first you would need your Cordinates, To get them you need this
self thread getCoordinates();
    
getCoordinates(){
self endon("death");
self endon("disconnect");
for(;Winky Winky{
self iPrintLnBold(self getOrigin());
wait 1;
self iPrintLnBold(self getOrigin());
wait 1;
self iPrintLnBold(self getOrigin());
wait 1;}}


Now that you have that you would need to put this code in any GSC
    
CreateWalls(start, end, vis)
{ blockb = [];
blockc = [];
blockd = [];
D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
H = Distance((0, 0, start[2]), (0, 0, end[2]));
if(!isDefined(vis)) vis = 0;
if(vis == 0)
{ blocks = roundUp(D/55);
height = roundUp(H/30);
tr = 75;
th = 40;
mod = "com_plasticcase_beige_big";
} else {
blocks = roundUp(D/90);
height = roundUp(H/90);
tr = 120;
th = 100;
mod = "tag_origin";
}
CX = end[0] - start[0];
CY = end[1] - start[1];
CZ = end[2] - start[2];
XA = (CX/blocks);
YA = (CY/blocks);
ZA = (CZ/height);
TXA = (XA/4);
TYA = (YA/4);
Temp = VectorToAngles(end - start);
Angle = (0, Temp[1], 90);
for(h = 0; h < height; h++)
{ fstpos = (start + (TXA, TYA, 10) + ((0, 0, ZA) * h));
block = spawn("script_model", fstpos);
block setModel(mod);
block.angles = Angle;
blockb[h] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, tr, th );
blockb[h].origin = fstpos;
blockb[h].angles = Angle;
blockb[h] setContents( 1 );
wait 0.001;
for(i = 1; i < blocks; i++){
secpos = (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h));
block = spawn("script_model", secpos);
block setModel(mod);
block.angles = Angle;
blockc[i] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, tr, th );
blockc[i].origin = secpos;
blockc[i].angles = Angle;
blockc[i] setContents( 1 );
wait 0.001;
}
if(blocks > 1)
{ trdpos = ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h));
block = spawn("script_model", trdpos);
block setModel(mod);
block.angles = Angle;
blockd[h] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, tr, th );
blockd[h].origin = trdpos;
blockd[h].angles = Angle;
blockd[h] setContents( 1 );
wait 0.001;
}
}
}

This is to create your walls.

After you have done that, Its time to mark your coordinates. Start off by adding a function
example...
    doBunker(){
CreateWalls((x, y, z), (x, y, z));
}

Now replace x,y,z with your coordinates, The first set of your xyz's is where you start your wall the second set is where you would end it.
example...
    
doBunker(){
CreateWalls((-155.78, -2586.6, 72.125), (-1511.41, -2079.26, 382.907));
}

And now you have a wall.
You must login or register to view this content.

Create Blocks

CrBlock(pos, angle)
{
block = spawn("script_model", pos );
block setModel("com_plasticcase_beige_big");
block.angles = angle;
blockb = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
blockb.origin = pos;
blockb.angles = angle;
blockb setContents( 1 );
wait 0.01;
}

Create Grids

CreateGrids(corner1, corner2, angle)
{
W = Distance((corner1[0], 0, 0), (corner2[0], 0, 0));
L = Distance((0, corner1[1], 0), (0, corner2[1], 0));
H = Distance((0, 0, corner1[2]), (0, 0, corner2[2]));
CX = corner2[0] - corner1[0];
CY = corner2[1] - corner1[1];
CZ = corner2[2] - corner1[2];
ROWS = roundUp(W/55);
COLUMNS = roundUp(L/30);
HEIGHT = roundUp(H/20);
XA = CX/ROWS;
YA = CY/COLUMNS;
ZA = CZ/HEIGHT;
center = spawn("script_model", corner1);
for(r = 0; r <= ROWS; r++){
for(c = 0; c <= COLUMNS; c++){
for(h = 0; h <= HEIGHT; h++){
block = spawn("script_model", (corner1 + (XA * r, YA * c, ZA * h)));
block setModel("com_plasticcase_beige_big");
block.angles = (0, 0, 0);
block Solid();
block LinkTo(center);
level.solid = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 ); //spawns the barrier
level.solid.origin = ((corner1 + (XA * r, YA * c, ZA * h))); //sets the location
level.solid.angles = (0, 90, 0); //sets the angles
level.solid setContents( 1 ); //sets the contents of the barrier
wait 0.01;
}
}
}
center.angles = angle;
}

Its really simple and easy. If you need help just pm me.


CREDITS
Hawkin for the solid walls
Killingdyl for the functions
Chrome Playa for the mw2 Tutorial
(adsbygoogle = window.adsbygoogle || []).push({});

The following 4 users say thank you to oO-GKUSH-Oo for this useful post:

Correy, FAKA_ELITE, Taylor, User2340034u
12-05-2011, 10:57 PM #2
iReset Nigga
2Fresshh!!
Originally posted by 9484
First I want to say I DONOT take full credit for this.


Ok first you would need your Cordinates, To get them you need this
self thread getCoordinates();
    
getCoordinates(){
self endon("death");
self endon("disconnect");
for(;Winky Winky{
self iPrintLnBold(self getOrigin());
wait 1;
self iPrintLnBold(self getOrigin());
wait 1;
self iPrintLnBold(self getOrigin());
wait 1;}}


Now that you have that you would need to put this code in any GSC
    
CreateWalls(start, end, vis)
{ blockb = [];
blockc = [];
blockd = [];
D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
H = Distance((0, 0, start[2]), (0, 0, end[2]));
if(!isDefined(vis)) vis = 0;
if(vis == 0)
{ blocks = roundUp(D/55);
height = roundUp(H/30);
tr = 75;
th = 40;
mod = "com_plasticcase_beige_big";
} else {
blocks = roundUp(D/90);
height = roundUp(H/90);
tr = 120;
th = 100;
mod = "tag_origin";
}
CX = end[0] - start[0];
CY = end[1] - start[1];
CZ = end[2] - start[2];
XA = (CX/blocks);
YA = (CY/blocks);
ZA = (CZ/height);
TXA = (XA/4);
TYA = (YA/4);
Temp = VectorToAngles(end - start);
Angle = (0, Temp[1], 90);
for(h = 0; h < height; h++)
{ fstpos = (start + (TXA, TYA, 10) + ((0, 0, ZA) * h));
block = spawn("script_model", fstpos);
block setModel(mod);
block.angles = Angle;
blockb[h] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, tr, th );
blockb[h].origin = fstpos;
blockb[h].angles = Angle;
blockb[h] setContents( 1 );
wait 0.001;
for(i = 1; i < blocks; i++){
secpos = (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h));
block = spawn("script_model", secpos);
block setModel(mod);
block.angles = Angle;
blockc[i] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, tr, th );
blockc[i].origin = secpos;
blockc[i].angles = Angle;
blockc[i] setContents( 1 );
wait 0.001;
}
if(blocks > 1)
{ trdpos = ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h));
block = spawn("script_model", trdpos);
block setModel(mod);
block.angles = Angle;
blockd[h] = spawn( "trigger_radius", ( 0, 0, 0 ), 0, tr, th );
blockd[h].origin = trdpos;
blockd[h].angles = Angle;
blockd[h] setContents( 1 );
wait 0.001;
}
}
}

This is to create your walls.

After you have done that, Its time to mark your coordinates. Start off by adding a function
example...
    doBunker(){
CreateWalls((x, y, z), (x, y, z));
}

Now replace x,y,z with your coordinates, The first set of your xyz's is where you start your wall the second set is where you would end it.
example...
    
doBunker(){
CreateWalls((-155.78, -2586.6, 72.125), (-1511.41, -2079.26, 382.907));
}

And now you have a wall.
You must login or register to view this content.

Create Blocks

CrBlock(pos, angle)
{
block = spawn("script_model", pos );
block setModel("com_plasticcase_beige_big");
block.angles = angle;
blockb = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
blockb.origin = pos;
blockb.angles = angle;
blockb setContents( 1 );
wait 0.01;
}

Create Grids

CreateGrids(corner1, corner2, angle)
{
W = Distance((corner1[0], 0, 0), (corner2[0], 0, 0));
L = Distance((0, corner1[1], 0), (0, corner2[1], 0));
H = Distance((0, 0, corner1[2]), (0, 0, corner2[2]));
CX = corner2[0] - corner1[0];
CY = corner2[1] - corner1[1];
CZ = corner2[2] - corner1[2];
ROWS = roundUp(W/55);
COLUMNS = roundUp(L/30);
HEIGHT = roundUp(H/20);
XA = CX/ROWS;
YA = CY/COLUMNS;
ZA = CZ/HEIGHT;
center = spawn("script_model", corner1);
for(r = 0; r <= ROWS; r++){
for(c = 0; c <= COLUMNS; c++){
for(h = 0; h <= HEIGHT; h++){
block = spawn("script_model", (corner1 + (XA * r, YA * c, ZA * h)));
block setModel("com_plasticcase_beige_big");
block.angles = (0, 0, 0);
block Solid();
block LinkTo(center);
level.solid = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 ); //spawns the barrier
level.solid.origin = ((corner1 + (XA * r, YA * c, ZA * h))); //sets the location
level.solid.angles = (0, 90, 0); //sets the angles
level.solid setContents( 1 ); //sets the contents of the barrier
wait 0.01;
}
}
}
center.angles = angle;
}

Its really simple and easy. If you need help just pm me.


CREDITS
Hawkin for the solid walls
Chrome Playa for the mw2 Tutorial


Studman already posted a tut on something like this but good job anyway

The following user thanked iReset Nigga for this useful post:

oO-GKUSH-Oo
12-05-2011, 11:03 PM #3
oO-GKUSH-Oo
< ^ > < ^ >
Originally posted by iReset
Studman already posted a tut on something like this but good job anyway

Ooh I wasnt aware of that, And Thanks :y:
12-08-2011, 02:16 AM #4
Woof
...hmm
Originally posted by 9484
Ooh I wasnt aware of that, And Thanks :y:

I posted this like ages ago don't know if you will like it or not, I see you like bunkers so yea.
This is for MW2, also excuse my bad programming skills I had when I posted this.

You must login or register to view this content.
12-08-2011, 02:40 AM #5
oO-GKUSH-Oo
< ^ > < ^ >
Yea its pretty cool.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo