Advertisement
player2_dz

Untitled

May 5th, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 18.95 KB | None | 0 0
  1. span class="re5"> func_createBox = {
  2.     private ["_boxSize", "_boxHeight", "_boxPos", "_lastLowerWall", "_cornerObj", "_cornerPos"];
  3.  
  4.     _boxSize = _this select 0;
  5.     _boxHeight = _this select 1;
  6.     _boxPos = _this select 2;
  7.  
  8.     _boxPos = [((_boxPos select 0) + _boxSize * 0.5) , ((_boxPos select 1) - _boxSize * 0.5),  _boxPos select 2];
  9.  
  10.     _lastLowerWall = [_boxPos, 90, _boxSize, _boxHeight] call func_createConcreteWall;
  11.     _cornerObj = [_lastLowerWall, -90, _boxHeight] call func_createConcreteCorner;
  12.     _cornerPos = getPos _cornerObj;
  13.     deleteVehicle _cornerObj;
  14.     _lastLowerWall = [_cornerPos, 180, _boxSize, _boxHeight] call func_createConcreteWall;
  15.     _cornerObj = [_lastLowerWall, 90, _boxHeight] call func_createConcreteCorner;
  16.     _cornerPos = getPos _cornerObj;
  17.     deleteVehicle _cornerObj;
  18.     _lastLowerWall = [_cornerPos, -90, _boxSize, _boxHeight] call func_createConcreteWall;
  19.     _cornerObj = [_lastLowerWall, 0, _boxHeight] call func_createConcreteCorner;
  20.     _cornerPos = getPos _cornerObj;
  21.     deleteVehicle _cornerObj;
  22.     _lastLowerWall = [_cornerPos, 0, _boxSize, _boxHeight] call func_createConcreteWall;
  23.  
  24. };
  25.  
  26. func_createConcreteWall = {
  27.     private ["_sleepTime", "_wallType", "_startPos", "_wallDirection", "_desiredLength", "_height", "_wallLevel", "_wall1", "_wallSize", "_wallWidth", "_wallLength", "_wallHeight", "_blockCount", "_lastLowerWall", "_skippedFirst", "_skippedFirstH"];
  28.     _sleepTime = 0.01;
  29.     _wallType = "Land_ConcreteBlock";
  30.    
  31.     _startPos = _this select 0;
  32.     _wallDirection = _this select 1;
  33.     _desiredLength = _this select 2;
  34.     _height = _this select 3;
  35.  
  36.     _wallLevel = ((_startPos) select 2);
  37.  
  38.     _wall1 = _wallType createVehicle [
  39.         _startPos select 0,
  40.         _startPos select 1,
  41.         _wallLevel
  42.     ];
  43.  
  44.     _wall1 setDir _wallDirection;
  45.  
  46.     _wall1 setPos [
  47.         ((getPos _wall1) select 0),
  48.         ((getPos _wall1) select 1),
  49.         _wallLevel
  50.     ];
  51.  
  52.     _wall1 setvectorup [0,0,1];
  53.  
  54.     _wallSize = boundingBox _wall1;
  55.     _wallWidth = _wallSize select 1;    _wallWidth = _wallWidth select 0;   _wallWidth = (_wallWidth * 2) - 0.1;
  56.     _wallLength = _wallSize select 1;   _wallLength = _wallLength select 1; _wallLength = (_wallLength * 2) - 0.1;
  57.     _wallHeight = _wallSize select 1;   _wallHeight = _wallHeight select 2; _wallHeight = (_wallHeight * 2) - 0.1;
  58.     _blockCount = _desiredLength / _wallWidth;  _blockCount = ceil _blockCount;
  59.     _lastLowerWall = objNull;
  60.    
  61.     if (_wallDirection == 0 || _wallDirection == 360) then {
  62.    
  63.  
  64.         for "_k" from 2 to _height do {
  65.  
  66.             call compile format(['
  67.                 _wallh1_%1 = _wallType createVehicle [
  68.                     ((getPos _wall1) select 0),
  69.                     ((getPos _wall1) select 1),
  70.                     _wallLevel + (_wallHeight * (%1 - 1))
  71.                 ];
  72.  
  73.                 _wallh1_%1 setDir _wallDirection;
  74.  
  75.                 _wallh1_%1 setPos [
  76.                     ((getPos _wall1) select 0),
  77.                     ((getPos _wall1) select 1),
  78.                     _wallLevel + (_wallHeight * (%1 - 1))
  79.                 ];
  80.  
  81.                 _wallh1_%1 setvectorup [0,0,1];
  82.  
  83.                 '
  84.             ,_k]);
  85.         };
  86.  
  87.  
  88.         _skippedFirst = false;
  89.         _skippedFirstH = false;
  90.  
  91.         for "_i" from 1 to _blockCount do {
  92.  
  93.             if (_skippedFirst) then {
  94.                 _lastLowerWall = call compile format(['
  95.                     _wall_%1 = _wallType createVehicle [
  96.                         ((getPos _wall1) select 0) + (_wallWidth * (%1 - 1)),
  97.                         ((getPos _wall1) select 1),
  98.                         _wallLevel
  99.                     ];
  100.  
  101.                     _wall_%1 setDir _wallDirection;
  102.  
  103.                     _wall_%1 setPos [
  104.                         ((getPos _wall1) select 0) + (_wallWidth * (%1 - 1)),
  105.                         ((getPos _wall1) select 1),
  106.                         _wallLevel
  107.                     ];
  108.  
  109.                     _wall_%1 setvectorup [0,0,1];
  110.  
  111.                     _wall_%1
  112.                     '
  113.                 ,_i]);
  114.      
  115.                 if (_skippedFirstH) then {
  116.  
  117.                     for "_j" from 2 to _height do {
  118.  
  119.                         call compile format(['
  120.                             _wallh_%1 = _wallType createVehicle [
  121.                             ((getPos _wall1) select 0) + (_wallWidth * (%2 - 1)),
  122.                                 ((getPos _wall1) select 1),
  123.                                 _wallLevel + (_wallHeight * (%1 - 1))
  124.                             ];
  125.  
  126.                             _wallh_%1 setDir _wallDirection;
  127.  
  128.                             _wallh_%1 setPos [
  129.                                 ((getPos _wall1) select 0) + (_wallWidth * (%2 - 1)),
  130.                                 ((getPos _wall1) select 1),
  131.                                 _wallLevel + (_wallHeight * (%1 - 1))
  132.                             ];
  133.  
  134.                             _wallh_%1 setvectorup [0,0,1];
  135.  
  136.                             '
  137.                         ,_j,_i]);
  138.                     };
  139.                 };
  140.  
  141.             };
  142.  
  143.             _skippedFirst = true;
  144.             _skippedFirstH = true;
  145.  
  146.         };
  147.     };
  148.  
  149.     if (_wallDirection == 180 || _wallDirection == -180) then {
  150.    
  151.         for "_k" from 2 to _height do {
  152.  
  153.             call compile format(['
  154.                 _wallh1_%1 = _wallType createVehicle [
  155.                     ((getPos _wall1) select 0),
  156.                     ((getPos _wall1) select 1),
  157.                     _wallLevel + (_wallHeight * (%1 - 1))
  158.                 ];
  159.  
  160.                 _wallh1_%1 setDir _wallDirection;
  161.  
  162.                 _wallh1_%1 setPos [
  163.                     ((getPos _wall1) select 0),
  164.                     ((getPos _wall1) select 1),
  165.                     _wallLevel + (_wallHeight * (%1 - 1))
  166.                 ];
  167.  
  168.                 _wallh1_%1 setvectorup [0,0,1];
  169.  
  170.                 '
  171.             ,_k]);
  172.         };
  173.  
  174.  
  175.         _skippedFirst = false;
  176.         _skippedFirstH = false;
  177.  
  178.         for "_i" from 1 to _blockCount do {
  179.  
  180.             if (_skippedFirst) then {
  181.                 _lastLowerWall = call compile format(['
  182.                     _wall_%1 = _wallType createVehicle [
  183.                         ((getPos _wall1) select 0) - (_wallWidth * (%1 - 1)),
  184.                         ((getPos _wall1) select 1),
  185.                         _wallLevel
  186.                     ];
  187.  
  188.                     _wall_%1 setDir _wallDirection;
  189.  
  190.                     _wall_%1 setPos [
  191.                         ((getPos _wall1) select 0) - (_wallWidth * (%1 - 1)),
  192.                         ((getPos _wall1) select 1),
  193.                         _wallLevel
  194.                     ];
  195.  
  196.                     _wall_%1 setvectorup [0,0,1];
  197.  
  198.                     _wall_%1
  199.                     '
  200.                 ,_i]);
  201.      
  202.                 if (_skippedFirstH) then {
  203.  
  204.                     for "_j" from 2 to _height do {
  205.  
  206.                         call compile format(['
  207.                             _wallh_%1 = _wallType createVehicle [
  208.                             ((getPos _wall1) select 0) - (_wallWidth * (%2 - 1)),
  209.                                 ((getPos _wall1) select 1),
  210.                                 _wallLevel + (_wallHeight * (%1 - 1))
  211.                             ];
  212.  
  213.                             _wallh_%1 setDir _wallDirection;
  214.  
  215.                             _wallh_%1 setPos [
  216.                                 ((getPos _wall1) select 0) - (_wallWidth * (%2 - 1)),
  217.                                 ((getPos _wall1) select 1),
  218.                                 _wallLevel + (_wallHeight * (%1 - 1))
  219.                             ];
  220.  
  221.                             _wallh_%1 setvectorup [0,0,1];
  222.  
  223.                             '
  224.                         ,_j,_i]);
  225.                     };
  226.                 };
  227.  
  228.             };
  229.  
  230.             _skippedFirst = true;
  231.             _skippedFirstH = true;
  232.  
  233.         };
  234.     };
  235.  
  236.     if (_wallDirection == 90) then {
  237.  
  238.         for "_k" from 2 to _height do {
  239.  
  240.             call compile format(['
  241.                 _wallh1_%1 = _wallType createVehicle [
  242.                     ((getPos _wall1) select 0),
  243.                     ((getPos _wall1) select 1),
  244.                     _wallLevel + (_wallHeight * (%1 - 1))
  245.                 ];
  246.  
  247.                 _wallh1_%1 setDir _wallDirection;
  248.  
  249.                 _wallh1_%1 setPos [
  250.                     ((getPos _wall1) select 0),
  251.                     ((getPos _wall1) select 1),
  252.                     _wallLevel + (_wallHeight * (%1 - 1))
  253.                 ];
  254.  
  255.                 _wallh1_%1 setvectorup [0,0,1];
  256.  
  257.                 '
  258.             ,_k]);
  259.         };
  260.  
  261.  
  262.         _skippedFirst = false;
  263.         _skippedFirstH = false;
  264.  
  265.         for "_i" from 1 to _blockCount do {
  266.  
  267.             if (_skippedFirst) then {
  268.                 _lastLowerWall = call compile format(['
  269.                     _wall_%1 = _wallType createVehicle [
  270.                         ((getPos _wall1) select 0),
  271.                         ((getPos _wall1) select 1) + (_wallWidth * (%1 - 1)),
  272.                         _wallLevel
  273.                     ];
  274.  
  275.                     _wall_%1 setDir _wallDirection;
  276.  
  277.                     _wall_%1 setPos [
  278.                         ((getPos _wall1) select 0),
  279.                         ((getPos _wall1) select 1) + (_wallWidth * (%1 - 1)),
  280.                         _wallLevel
  281.                     ];
  282.  
  283.                     _wall_%1 setvectorup [0,0,1];
  284.  
  285.                     _wall_%1
  286.                     '
  287.                 ,_i]);
  288.             };
  289.  
  290.             if (_skippedFirstH) then {
  291.  
  292.                 for "_j" from 2 to _height do {
  293.  
  294.                     call compile format(['
  295.                         _wallh_%1 = _wallType createVehicle [
  296.                             ((getPos _wall1) select 0),
  297.                             ((getPos _wall1) select 1) + (_wallWidth * (%2 - 1)),
  298.                             _wallLevel + (_wallHeight * (%1 - 1))
  299.                         ];
  300.  
  301.                         _wallh_%1 setDir _wallDirection;
  302.  
  303.                         _wallh_%1 setPos [
  304.                             ((getPos _wall1) select 0),
  305.                             ((getPos _wall1) select 1) + (_wallWidth * (%2 - 1)),
  306.                             _wallLevel + (_wallHeight * (%1 - 1))
  307.                         ];
  308.  
  309.                         _wallh_%1 setvectorup [0,0,1];
  310.  
  311.                         '
  312.                     ,_j,_i]);
  313.                 };
  314.  
  315.             };
  316.  
  317.             _skippedFirst = true;
  318.             _skippedFirstH = true;
  319.  
  320.         };
  321.     };
  322.  
  323.     if (_wallDirection == -90) then {
  324.  
  325.         for "_k" from 2 to _height do {
  326.  
  327.             call compile format(['
  328.                 _wallh1_%1 = _wallType createVehicle [
  329.                     ((getPos _wall1) select 0),
  330.                     ((getPos _wall1) select 1),
  331.                     _wallLevel + (_wallHeight * (%1 - 1))
  332.                 ];
  333.  
  334.                 _wallh1_%1 setDir _wallDirection;
  335.  
  336.                 _wallh1_%1 setPos [
  337.                     ((getPos _wall1) select 0),
  338.                     ((getPos _wall1) select 1),
  339.                     _wallLevel + (_wallHeight * (%1 - 1))
  340.                 ];
  341.  
  342.                 _wallh1_%1 setvectorup [0,0,1];
  343.  
  344.                 '
  345.             ,_k]);
  346.         };
  347.  
  348.  
  349.         _skippedFirst = false;
  350.         _skippedFirstH = false;
  351.  
  352.         for "_i" from 1 to _blockCount do {
  353.  
  354.             if (_skippedFirst) then {
  355.  
  356.                 _lastLowerWall = call compile format(['
  357.                     _wall_%1 = _wallType createVehicle [
  358.                         ((getPos _wall1) select 0),
  359.                         ((getPos _wall1) select 1) - (_wallWidth * (%1 - 1)),
  360.                         _wallLevel
  361.                     ];
  362.  
  363.                     _wall_%1 setDir _wallDirection;
  364.  
  365.                     _wall_%1 setPos [
  366.                         ((getPos _wall1) select 0),
  367.                         ((getPos _wall1) select 1) - (_wallWidth * (%1 - 1)),
  368.                         _wallLevel
  369.                     ];
  370.  
  371.                     _wall_%1 setvectorup [0,0,1];
  372.  
  373.                     _wall_%1
  374.                     '
  375.                 ,_i]);
  376.             };
  377.  
  378.             if (_skippedFirstH) then {
  379.  
  380.                 for "_j" from 2 to _height do {
  381.  
  382.                     call compile format(['
  383.                         _wallh_%1 = _wallType createVehicle [
  384.                             ((getPos _wall1) select 0),
  385.                             ((getPos _wall1) select 1) - (_wallWidth * (%2 - 1)),
  386.                             _wallLevel + (_wallHeight * (%1 - 1))
  387.                         ];
  388.  
  389.                         _wallh_%1 setDir _wallDirection;
  390.  
  391.                         _wallh_%1 setPos [
  392.                             ((getPos _wall1) select 0),
  393.                             ((getPos _wall1) select 1) - (_wallWidth * (%2 - 1)),
  394.                             _wallLevel + (_wallHeight * (%1 - 1))
  395.                         ];
  396.  
  397.                         _wallh_%1 setvectorup [0,0,1];
  398.  
  399.                         '
  400.                     ,_j,_i]);
  401.                 };
  402.  
  403.             };
  404.  
  405.             _skippedFirst = true;
  406.             _skippedFirstH = true;
  407.  
  408.         };
  409.     };
  410.  
  411.     _lastLowerWall
  412. };
  413.  
  414. func_createConcreteCorner = {
  415.     private ["_wallEndObj", "_cornerDir", "_newDir", "_height", "_startPos", "_wallType", "_sleepTime", "_wallLevel", "_corner1", "_wallSize", "_wallWidth", "_wallLength", "_wallHeight", "_cornerObj", "_cornerDir2", "_skippedFirst"];
  416.     _wallEndObj = _this select 0;
  417.     _cornerDir = _this select 1;
  418.     _newDir = getDir _wallEndObj + _cornerDir;
  419.     _cornerDir = _newDir;
  420.  
  421.  
  422.     _height = _this select 2;
  423.     _startPos = getPos _wallEndObj;
  424.     _wallType = "Land_ConcreteBlock";
  425.     _sleepTime = 0.01;
  426.  
  427.     _wallLevel = ((_startPos) select 2);
  428.  
  429.     _corner1 = _wallType createVehicle [
  430.         _startPos select 0,
  431.         _startPos select 1,
  432.         _wallLevel
  433.     ];
  434.  
  435.     _corner1 setDir _cornerDir;
  436.  
  437.  
  438.     _wallSize = boundingBox _corner1;
  439.     _wallWidth = _wallSize select 1;    _wallWidth = _wallWidth select 0;   _wallWidth = (_wallWidth * 2) - 0.1;
  440.     _wallLength = _wallSize select 1;   _wallLength = _wallLength select 1; _wallLength = (_wallLength * 2) - 0.1;
  441.     _wallHeight = _wallSize select 1;   _wallHeight = _wallHeight select 2; _wallHeight = (_wallHeight * 2) - 0.1;
  442.     _cornerObj = _corner1;
  443.     _cornerDir2 = _cornerDir;
  444.  
  445.     if ((_this select 1) == -90) then {
  446.         _corner1 setPos [
  447.             ((getPos _corner1) select 0),
  448.             ((getPos _corner1) select 1) + _wallWidth,
  449.             _wallLevel
  450.         ];
  451.         for "_k" from 2 to _height do {
  452.             _skippedFirst = false;
  453.             if (_skippedFirst) then {
  454.  
  455.                 call compile format(['
  456.                     _wallh1_%1 = _wallType createVehicle [
  457.                         ((getPos _corner1) select 0),
  458.                         ((getPos _corner1) select 1) + (_wallLength / 2),
  459.                         _wallLevel + (_wallHeight * (%1 - 1))
  460.                     ];
  461.  
  462.                     _wallh1_%1 setDir _cornerDir2;
  463.  
  464.                     _wallh1_%1 setPos [
  465.                         ((getPos _corner1) select 0),
  466.                         ((getPos _corner1) select 1),
  467.                         _wallLevel + (_wallHeight * (%1 - 1))
  468.                     ];
  469.  
  470.                     _wallh1_%1 setvectorup [0,0,1];
  471.  
  472.                     '
  473.                 ,_k]);
  474.             };
  475.  
  476.             _skippedFirst = true;
  477.  
  478.         };
  479.     };
  480.  
  481.     if ((_this select 1) == -180) then {
  482.         _corner1 setPos [
  483.             ((getPos _corner1) select 0),
  484.             ((getPos _corner1) select 1) - (_wallLength),
  485.             _wallLevel
  486.         ];
  487.         _corner1 setDir (_cornerDir - 90);
  488.         _cornerDir2 = _cornerDir - 90;
  489.         for "_k" from 2 to _height do {
  490.             _skippedFirst = false;
  491.             if (_skippedFirst) then {
  492.                 call compile format(['
  493.                     _wallh1_%1 = _wallType createVehicle [
  494.                         ((getPos _corner1) select 0),
  495.                         ((getPos _corner1) select 1) - (_wallLength),
  496.                         _wallLevel + (_wallHeight * (%1 - 1))
  497.                     ];
  498.  
  499.                     _wallh1_%1 setDir _cornerDir2;
  500.  
  501.                     _wallh1_%1 setPos [
  502.                         ((getPos _corner1) select 0),
  503.                         ((getPos _corner1) select 1),
  504.                         _wallLevel + (_wallHeight * (%1 - 1))
  505.                     ];
  506.  
  507.                     _wallh1_%1 setvectorup [0,0,1];
  508.  
  509.                     '
  510.                 ,_k]);
  511.             };
  512.             _skippedFirst = true;
  513.  
  514.         };
  515.     };
  516.  
  517.     if ((_this select 1) == 90) then {
  518.         _corner1 setPos [
  519.             ((getPos _corner1) select 0) - (_wallWidth) -1,
  520.             ((getPos _corner1) select 1) - (_wallWidth) - 3,
  521.             _wallLevel
  522.         ];
  523.         for "_k" from 2 to _height do {
  524.             _skippedFirst = false;
  525.             if (_skippedFirst) then {
  526.                 call compile format(['
  527.                     _wallh1_%1 = _wallType createVehicle [
  528.                     ((getPos _corner1) select 0) - (_wallWidth / 2),
  529.                     ((getPos _corner1) select 1) - (_wallLength * 2),
  530.                         _wallLevel + (_wallHeight * (%1 - 1))
  531.                     ];
  532.  
  533.                     _wallh1_%1 setDir _cornerDir2;
  534.  
  535.                     _wallh1_%1 setPos [
  536.                         ((getPos _corner1) select 0),
  537.                         ((getPos _corner1) select 1),
  538.                         _wallLevel + (_wallHeight * (%1 - 1))
  539.                     ];
  540.  
  541.                     _wallh1_%1 setvectorup [0,0,1];
  542.  
  543.                     '
  544.                 ,_k]);
  545.             };
  546.             _skippedFirst = true;
  547.         };
  548.     };
  549.  
  550.     if ((_this select 1) == 180) then {
  551.         _corner1 setPos [
  552.             ((getPos _corner1) select 0),
  553.             ((getPos _corner1) select 1) + (_wallLength / 2),
  554.             _wallLevel
  555.         ];
  556.         _corner1 setDir (_cornerDir + 90);
  557.         _cornerDir2 = _cornerDir + 90;
  558.         for "_k" from 2 to _height do {
  559.             _skippedFirst = false;
  560.             if (_skippedFirst) then {
  561.                 call compile format(['
  562.                     _wallh1_%1 = _wallType createVehicle [
  563.                         ((getPos _corner1) select 0),
  564.                         ((getPos _corner1) select 1) + (_wallLength / 2),
  565.                         _wallLevel + (_wallHeight * (%1 - 1))
  566.                     ];
  567.  
  568.                     _wallh1_%1 setDir _cornerDir2;
  569.  
  570.                     _wallh1_%1 setPos [
  571.                         ((getPos _corner1) select 0),
  572.                         ((getPos _corner1) select 1),
  573.                         _wallLevel + (_wallHeight * (%1 - 1))
  574.                     ];
  575.  
  576.                     _wallh1_%1 setvectorup [0,0,1];
  577.  
  578.                     '
  579.                 ,_k]);
  580.             };
  581.             _skippedFirst = true;
  582.         };
  583.     };
  584.     if ((_this select 1) == 0) then {
  585.         _corner1 setPos [
  586.             ((getPos _corner1) select 0),
  587.             ((getPos _corner1) select 1) - _wallLength,
  588.             _wallLevel
  589.         ];
  590.         _corner1 setDir (_cornerDir + 90);
  591.         _cornerDir2 = _cornerDir + 90;
  592.  
  593.         for "_k" from 2 to _height do {
  594.             _skippedFirst = false;
  595.             if (_skippedFirst) then {
  596.                 call compile format(['
  597.                     _wallh1_%1 = _wallType createVehicle [
  598.                         ((getPos _corner1) select 0),
  599.                     ((getPos _corner1) select 1) - _wallLength,
  600.                         _wallLevel + (_wallHeight * (%1 - 1))
  601.                     ];
  602.  
  603.                     _wallh1_%1 setDir _cornerDir2;
  604.  
  605.                     _wallh1_%1 setPos [
  606.                         ((getPos _corner1) select 0),
  607.                         ((getPos _corner1) select 1),
  608.                         _wallLevel + (_wallHeight * (%1 - 1))
  609.                     ];
  610.  
  611.                     _wallh1_%1 setvectorup [0,0,1];
  612.  
  613.                     '
  614.                 ,_k]);
  615.             };
  616.             _skippedFirst = true;
  617.         }; 
  618.     };
  619.     _cornerObj
  620. };
  621.  
  622.  
  623. func_createBase = {
  624.     private ["_boxSize", "_boxHeight", "_boxPos", "_lastLowerWall", "_cornerObj", "_cornerPos"];
  625.  
  626.     _boxSize = _this select 0;
  627.     _boxHeight = _this select 1;
  628.     _entranceHeight = _this select 2;
  629.     _boxPos = _this select 3;
  630.  
  631.     _boxPos = [((_boxPos select 0) + (_boxSize * 0.5)) , ((_boxPos select 1) - (_boxSize * 0.5)),  _boxPos select 2];
  632.  
  633.     _lastLowerWall = [_boxPos, 90, _boxSize, _boxHeight] call func_createConcreteWall;
  634.     _cornerObj = [_lastLowerWall, -90, _boxHeight] call func_createConcreteCorner;
  635.     _cornerPos = getPos _cornerObj;
  636.     deleteVehicle _cornerObj;
  637.     _lastLowerWall = [_cornerPos, 180, _boxSize, _boxHeight] call func_createConcreteWall;
  638.     _cornerObj = [_lastLowerWall, 90, _boxHeight] call func_createConcreteCorner;
  639.     _cornerPos = getPos _cornerObj; _secondCornerPos = _cornerPos;
  640.     deleteVehicle _cornerObj;
  641.     _lastLowerWall = [_cornerPos, -90, _boxSize, _boxHeight] call func_createConcreteWall;
  642.     _cornerObj = [_lastLowerWall, 0, _boxHeight] call func_createConcreteCorner;
  643.     _cornerPos = getPos _cornerObj; _thirdCornerPos = _cornerPos;
  644.     deleteVehicle _cornerObj;
  645.     _lastLowerWall = [_cornerPos, 0, (_boxSize / 3.1), _boxHeight] call func_createConcreteWall;
  646.     _lastLowerWallPos = position _lastLowerWall;
  647.  
  648.     _wallSize = boundingBox _lastLowerWall;
  649.     _wallWidth = _wallSize select 1;    _wallWidth = _wallWidth select 0;   _wallWidth = (_wallWidth * 2) - 0.1;
  650.     _wallLength = _wallSize select 1;   _wallLength = _wallLength select 1; _wallLength = (_wallLength * 2) - 0.1;
  651.     _wallHeight = _wallSize select 1;   _wallHeight = _wallHeight select 2; _wallHeight = (_wallHeight * 2) - 0.1;
  652.     _blockCount = _boxSize / _wallWidth;    _blockCount = ceil _blockCount;
  653.  
  654.     _heliPadPos = [(_secondCornerPos select 0) + _wallWidth * 2, (_secondCornerPos select 1) - _wallWidth * 1, 0];
  655.  
  656.     _heliPad = "HeliHCivil" createVehicle _heliPadPos;
  657.     _vehSpawnPos = _heliPadPos;
  658.     _heli = "UH1H_DZ" createVehicle _heliPadPos;
  659.     _heli setPos _heliPadPos;
  660.  
  661.  
  662.     for "_i" from 0 to (_entranceHeight - 1) do {
  663.         _outerWallEPos = [];
  664.         _outerWallEPos2 = [];
  665.         _outerWallEPos3 = [];
  666.         _outerWallE = objNull;
  667.         _outerWallE2 = objNull;
  668.         _outerWallE3 = objNull;
  669.  
  670.         _outerWallEPos =  [(_lastLowerWallPos select 0) + (_wallWidth * 0.8), (_lastLowerWallPos select 1) - (_wallWidth * 1.15), (_wallHeight * _i)];
  671.         _outerWallE = "Land_ConcreteBlock" createVehicle _outerWallEPos;
  672.         _outerWallE setDir -15;
  673.         _outerWallE setPos _outerWallEPos;
  674.         _outerWallE setvectorup [0,0,1];
  675.  
  676.         _outerWallEPos2 =  [(_outerWallEPos select 0) + (_wallWidth * 0.96), (_outerWallEPos select 1) + (_wallWidth * 0.256), (_wallHeight * _i)];
  677.         _outerWallE2 = "Land_ConcreteBlock" createVehicle _outerWallEPos2;
  678.         _outerWallE2 setDir -15;
  679.         _outerWallE2 setPos _outerWallEPos2;
  680.         _outerWallE2 setvectorup [0,0,1];
  681.  
  682.         _outerWallEPos3 =  [(_outerWallEPos select 0) + ((_wallWidth * 0.96) * 2), (_outerWallEPos select 1) + (_wallWidth * 0.512), (_wallHeight * _i)];
  683.         _outerWallE3 = "Land_ConcreteBlock" createVehicle _outerWallEPos3;
  684.         _outerWallE3 setDir -15;
  685.         _outerWallE3 setPos _outerWallEPos3;
  686.         _outerWallE3 setvectorup [0,0,1];
  687.  
  688.     };
  689.  
  690.     _camoNetPos =  [(_thirdCornerPos select 0) + 5, (_thirdCornerPos select 1) + _wallWidth * 0.5, 0];
  691.     _net = "Land_CamoNetVar_NATO" createVehicle _camoNetPos;
  692.     _net setPos _camoNetPos;
  693.     _net setvectorup [0,0,1];
  694.    
  695.     _crate1SpawnPos = [(_thirdCornerPos select 0) + 0.3, (_thirdCornerPos select 1) + _wallWidth * 0.3, 0];
  696.     _crate1 = "RUVehicleBox" createVehicle _crate1SpawnPos;
  697.     _crate1 setPos _crate1SpawnPos;
  698.     _crate1 setvectorup [0,0,1];
  699.  
  700.     _crate2SpawnPos = [(_thirdCornerPos select 0) + 0.3, (_thirdCornerPos select 1) + _wallWidth * 0.6, 0];
  701.     _crate2 = "RUVehicleBox" createVehicle _crate2SpawnPos;
  702.     _crate2 setPos _crate2SpawnPos;
  703.     _crate2 setvectorup [0,0,1];
  704.  
  705.     _crate3SpawnPos = [(_thirdCornerPos select 0) + 6.8, (_thirdCornerPos select 1) + _wallWidth * 0.3, 0];
  706.     _crate3 = "RUVehicleBox" createVehicle _crate3SpawnPos;
  707.     _crate3 setPos _crate3SpawnPos;
  708.     _crate3 setvectorup [0,0,1];
  709.  
  710.     _crate4SpawnPos = [(_thirdCornerPos select 0) + 6.8, (_thirdCornerPos select 1) + _wallWidth * 0.6, 0];
  711.     _crate4 = "RUVehicleBox" createVehicle _crate4SpawnPos;
  712.     _crate4 setPos _crate4SpawnPos;
  713.     _crate4 setvectorup [0,0,1];
  714. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement