(adsbygoogle = window.adsbygoogle || []).push({});
This is from a Se7ensins member DJQUICKSILVER
So i just brought it to the NGU community
All credit goes to DJQUICKSILVER
I know a lot of people want to know how to make bunkers and skybases like the ones in MW2 so i thought I would give a shot at coding solid models.
Unfortunately Call of Duty 4 doesn't support the ability to turn models solid so I have had to create a new function that allows you to create a barrier.
level.solid = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 ); //spawns the barrier
level.solid.origin = (0,0,0); //sets the location
level.solid.angles = (0, 90, 0); //sets the angles
level.solid setContents( 1 ); //sets the contents of the barrier
Example: stairway to heaven from MW2
self thread stairz(70); //add to onPlayerSpawned
self thread stair(70); //add to onPlayerSpawned
stairz(size)
{
stairz = [];
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++)
{
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
stairz = spawn("script_model", newPos);
stairz.angles = (0, 90, 0);
wait .1;
stairz setModel( "com_plasticcase_green_big" );
}
}
stair(size)
{
stairz = [];
stairPos = self.origin+(100, 0, 0);
for(i=0;i<=size;i++)
{
newPos = (stairPos + ((58 * i / 2 ), 0, (17 * i / 2)));
level.packo = spawn( "trigger_radius", ( 0, 0, 0 ), 0, 65, 30 );
level.packo.origin = newpos;
level.packo.angles = (0, 90, 0);
level.packo setContents( 1 );
}
}