Jump to content
Sign in to follow this  
rachio

FOB Template script issues(Preproccessing, off set Alt, etc)

Recommended Posts

Hello, first I would like to start off that I am absolutely a novice at scripting. I've been trying to decipher/reverse-engineer previously made scripts and study up on the wiki in order to make some cool things to keep me occupied while I'm deployed.

Overview:

Issue: Third level of Hesko's are offset in the air and at an angle.

Issue: Description.ext won't preprocess certain scripts/crashes the game.

Issue: Personnel script will not recognize turret variables. (Added 11 March 2014)

Issue: Select vehicles spawn in damaged at random despite having good clearance. (Added 11 March 2014)

Inquiry: Way to set direction of the entire script when spawning, Instead of it being the static direction set by the script.

Inquiry: Add alarm system from a trigger that syncs up with script-spawned loudspeakers.

Inquiry: Way to repair FOB overtime when no enemies in area. (Added 11 March 2014)

Inquiry: How to Create sector trough scripting located on spawn marker. (Added 11 March 2014)

Will update if further issues arise.

Currently, I'm attempting to make a modular FOB template to use in my mission. I started off by blocking out a general design and then made a rough script. From there, I went on to organize the data and then shortened it by using arrays(?).

After organizing the data, I began to make it into a modular system in order to add variety. Currently I have it set into three different scripts: 1. The FOB, 2. Vehicles, and 3. Personnel. Main my focus currently is the actual FOB before I try to be more advance with the latter two.

My first issue I encountered was adding a third level of H-Barriers seemed to my walls. For some reason, only the third layer gets offset in altitude and rotation.

I've tried lowering, raising, and moving but still maintains the same offset.

Code of the Right side wall.

/*----------------------------------------------------------------------------*/
/*---------------------------Right Side Wall----------------------------------*/
/*----------------------------------------------------------------------------*/
//Bottom Layer
_R_S_1_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_6  = createVehicle[_HWALL ,[_X +0    ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];


//Middle Layer
_R_S_2_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_6  = createVehicle[_HWALL ,[_X +0    ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];

//Top Layer
                                                                                 /*
_R_S_3_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_6  = createVehicle[_HWALL ,[_X +0    ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |--> Bugged
_R_S_3_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; */

Onto my second issue, I've been trying to use the description.ext to basically link up the different scripts. For example, my definitions script. Instead of keeping this code apart of every script, I want it to be independent so all three sheets can draw from it. I've tried several ways to use this method with the " #include "filename"; " but unfortunately... it either gives me an failed error 7, 2 or just crashes the game completely. I'm not completely sure if this is the right script to use for my needs, but after breaking several open this seemed like the most likely candidate to do it in.

Definitions.sqf

/*----------------------------------------------------------------------------*/
/*-----------------------------Positions--------------------------------------*/
/*----------------------------------------------------------------------------*/
_POS = (getmarkerPos "Base_1");
_X =  (_POS select 0);
_Y =  (_POS select 1);
_Z =  (_POS select 2);

/*----------------------------------------------------------------------------*/
/*-------------------------------Objects--------------------------------------*/
/*----------------------------------------------------------------------------*/
_HWALL       = "Land_HBarrier_5_F";
_RAZORWIRE   = "Land_Razorwire_F";
_BAGR        = "Land_BagFence_Round_F";
_BAGE        = "Land_BagFence_End_F";
_BAGS        = "Land_BagFence_Short_F";
_Barrier     = "Land_CncBarrierMedium_F";
_HELIPADS    = "Land_HelipadSquare_F";
_HELIPADI    = "Land_HelipadEmpty_F"; //Invisible
_LZLight     = "Land_runway_edgelight_blue_F";
_FOBLIGHT    = "";
_HAZLIGHT    = "Land_Flush_Light_red_F";
_HQ          = "Land_Cargo_HQ_V1_F";
_ALARM       = "Land_Loudspeakers_F";
_SIGN        = "Land_Sign_WarningMilitaryArea_F";
_Tower       = "Land_Cargo_Patrol_V1_F";
_GMG         = "B_GMG_01_high_F";
_HMG         = "B_HMG_01_high_F";
_AA          = "B_APC_Tracked_01_AA_F";
_GhostHawk   = "B_Heli_Transport_01_F";
_CAS         = "B_Heli_Attack_01_F";
_SLAMMER     = "B_MBT_01_cannon_F";
_PANTHER     = "B_APC_Tracked_01_rcws_F";
_MARSHALL    = "B_APC_Wheeled_01_cannon_F";

Now onto the inquiries. I would ultimately love to be able to set the general direction/rotation of the entire template without actually rewriting the entire code. I tried doing an array(Again, not sure if that's the right word) like " Test=[]execVM "Filename"; Test setDir #; " but was ultimately told that I can't do that by the error messages. If there's a way to accomplish this, it would be much appreciated!

Lastly(At least for now), I would like to create a proximity alarm for the FOB. As I have little experience in scripting let alone scripting triggers, I absolutely have no idea where to start. I tried breaking open some examples but ended up even more confused. The parameters I'm looking for are basically a 500m radius around the FOB originating at the marker's center that will play either the default or custom alarm.

Thank you in advance for everyone who shares a bit of wisdom to the less fortunate, and my apologies for the horrible grammar as writing has never been a skill of mine.

Also, for those who are curious and/or requiring more information, here's the full main script as of the moment

#include "Definitions.sqf"

/*----------------------------------------------------------------------------*/
/*---------------------------------Notes--------------------------------------*/
/*----------------------------------------------------------------------------*/
//Create Object or Vehicle Code
//createVehicle[ **Item** ,[_X,_Y,_Z],[],0,"CAN_COLLIDE"];

//REMINDER: Find out the cause for top layer offset.
//REMINDER: Build IDF Bunkers.
//REMINDER: Add Static mortars.
//REMINDER: Figure out how to make an alarm system using scripted trigger.

/*----------------------------------------------------------------------------*/
/*------------------------------HQ Building-----------------------------------*/
/*----------------------------------------------------------------------------*/
_HQ1 = createVehicle[_HQ,[_X +25 ,_Y  ,_Z   ],[],0,"CAN_COLLIDE"];

_ALARMSYS = createVehicle[_ALARM,[_X +33 ,_Y  ,_Z   ],[],0,"CAN_COLLIDE"];

/*----------------------------------------------------------------------------*/
/*----------------------------Landing Zones-----------------------------------*/
/*----------------------------------------------------------------------------*/
//Middle (Invisible)
_LZ1 = createVehicle[_HELIPADI,[_X     ,_Y     ,_Z   ],[],0,"CAN_COLLIDE"]; _LZ1 setDir 270;

//Left
_LZ2 = createVehicle[_HELIPADS,[_X +20 ,_Y +25 ,_Z   ],[],0,"CAN_COLLIDE"]; _LZ2 setDir 270; 

//Right
_LZ3 = createVehicle[_HELIPADS,[_X +20 ,_Y -25 ,_Z   ],[],0,"CAN_COLLIDE"]; _LZ3 setDir 270;

//Left
_Light1 = createVehicle[_LZLight,[_X +25 ,_Y -30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light2 = createVehicle[_LZLight,[_X +25 ,_Y -20 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light3 = createVehicle[_LZLight,[_X +15 ,_Y -30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light4 = createVehicle[_LZLight,[_X +15 ,_Y -20 ,_Z   ],[],0,"CAN_COLLIDE"];

//Right
_Light5 = createVehicle[_LZLight,[_X +25 ,_Y +30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light6 = createVehicle[_LZLight,[_X +25 ,_Y +20 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light7 = createVehicle[_LZLight,[_X +15 ,_Y +30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light8 = createVehicle[_LZLight,[_X +15 ,_Y +20 ,_Z   ],[],0,"CAN_COLLIDE"];

/*----------------------------------------------------------------------------*/
/*-----------------------------Guard Towers-----------------------------------*/
/*----------------------------------------------------------------------------*/
_T1 = createVehicle[_Tower ,[_X +32 ,_Y +48 ,_Z     ],[],0,"CAN_COLLIDE"];  _T1 setDir 270; //BackWall
_T2 = createVehicle[_Tower ,[_X +32 ,_Y -50 ,_Z     ],[],0,"CAN_COLLIDE"];  _T2 setDir 270; //BackWall
_T3 = createVehicle[_Tower ,[_X -22 ,_Y +48 ,_Z     ],[],0,"CAN_COLLIDE"];  _T3 setDir 90;  //FrontWall
_T4 = createVehicle[_Tower ,[_X -22 ,_Y -50 ,_Z     ],[],0,"CAN_COLLIDE"];  _T4 setDir 90;  //FrontWall

//T1
_GMG1 = createVehicle[_GMG ,[_X +33 ,_Y +47 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG1 setDir 90;  //BackWall
_HMG1 = createVehicle[_HMG ,[_X +33 ,_Y +51 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG1 setDir 90;  //BackWall

//T2
_GMG2 = createVehicle[_GMG ,[_X +33 ,_Y -47 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG2 setDir 90;  //BackWall
_HMG2 = createVehicle[_HMG ,[_X +33 ,_Y -51 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG2 setDir 90;  //BackWall

//T3
_GMG3 = createVehicle[_GMG ,[_X -23 ,_Y +48.5 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG3 setDir 270;  //FrontWall Right
_HMG3 = createVehicle[_HMG ,[_X -23 ,_Y +50.5 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG3 setDir 270;  //FrontWall Right

//T4
_GMG4 = createVehicle[_GMG ,[_X -23 ,_Y -47.5 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG4 setDir 270; //FrontWall Left
_HMG4 = createVehicle[_HMG ,[_X -23 ,_Y -50 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG4 setDir 270; //FrontWall Left





/*----------------------------------------------------------------------------*/
/*---------------------------Right Side Wall----------------------------------*/
/*----------------------------------------------------------------------------*/
//Bottom Layer
_R_S_1_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_6  = createVehicle[_HWALL ,[_X +0    ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];
_R_S_1_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y +54 ,_Z     ],[],0,"CAN_COLLIDE"];


//Middle Layer
_R_S_2_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_6  = createVehicle[_HWALL ,[_X +0    ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_R_S_2_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y +54 ,_Z +1.2],[],0,"CAN_COLLIDE"];

//Top Layer
                                                                                 /*
_R_S_3_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_6  = createVehicle[_HWALL ,[_X +0    ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |--> Bugged
_R_S_3_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_R_S_3_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y +54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; */

/*----------------------------------------------------------------------------*/
/*-----------------------------Left Side Wall---------------------------------*/
/*----------------------------------------------------------------------------*/
//Bottom Layer
_L_S_1_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_6  = createVehicle[_HWALL ,[_X +0    ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];
_L_S_1_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y -54 ,_Z     ],[],0,"CAN_COLLIDE"];

//Middle Layer
_L_S_2_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_6  = createVehicle[_HWALL ,[_X +0    ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];
_L_S_2_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"];

//Top Layer                                                                       
                                                                                 /*  
_L_S_3_1  = createVehicle[_HWALL ,[_X -25.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_2  = createVehicle[_HWALL ,[_X -20.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_3  = createVehicle[_HWALL ,[_X -15.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_4  = createVehicle[_HWALL ,[_X -10.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_5  = createVehicle[_HWALL ,[_X -5.5  ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_6  = createVehicle[_HWALL ,[_X +0    ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |--> Bugged
_L_S_3_7  = createVehicle[_HWALL ,[_X +5.5  ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_8  = createVehicle[_HWALL ,[_X +10.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_9  = createVehicle[_HWALL ,[_X +15.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_10 = createVehicle[_HWALL ,[_X +20.5 ,_Y -54 ,_Z +2.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_11 = createVehicle[_HWALL ,[_X +25.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"]; |
_L_S_3_12 = createVehicle[_HWALL ,[_X +30.5 ,_Y -54 ,_Z +1.2],[],0,"CAN_COLLIDE"]; */

/*----------------------------------------------------------------------------*/
/*-------------------------------BackWall-------------------------------------*/
/*----------------------------------------------------------------------------*/

/*---------------------------------Right--------------------------------------*/

//Bottom Layer

_R_B_1_1  = createVehicle[_HWALL ,[_X +34   ,_Y +0    ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_1  setDir 270;       
_R_B_1_2  = createVehicle[_HWALL ,[_X +34   ,_Y +5.5  ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_2  setDir 270;       
_R_B_1_3  = createVehicle[_HWALL ,[_X +34   ,_Y +11   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_3  setDir 270;       
_R_B_1_4  = createVehicle[_HWALL ,[_X +34   ,_Y +16.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_4  setDir 270;       
_R_B_1_5  = createVehicle[_HWALL ,[_X +34   ,_Y +22   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_5  setDir 270;       
_R_B_1_6  = createVehicle[_HWALL ,[_X +34   ,_Y +27   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_6  setDir 270;       
_R_B_1_7  = createVehicle[_HWALL ,[_X +34   ,_Y +32.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_7  setDir 270;       
_R_B_1_8  = createVehicle[_HWALL ,[_X +34   ,_Y +38   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_8  setDir 270;       
_R_B_1_9  = createVehicle[_HWALL ,[_X +34   ,_Y +43.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_9  setDir 270;       
_R_B_1_10 = createVehicle[_HWALL ,[_X +34   ,_Y +47   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_10 setDir 270;       
_R_B_1_11 = createVehicle[_HWALL ,[_X +34   ,_Y +52   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_B_1_11 setDir 270;    

//Middle Layer                                                                                                 
_R_B_2_1  = createVehicle[_HWALL ,[_X +34   ,_Y +0    ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_1  setDir 270;         
_R_B_2_2  = createVehicle[_HWALL ,[_X +34   ,_Y +5.5  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_2  setDir 270;         
_R_B_2_3  = createVehicle[_HWALL ,[_X +34   ,_Y +11   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_3  setDir 270;         
_R_B_2_4  = createVehicle[_HWALL ,[_X +34   ,_Y +16.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_4  setDir 270;         
_R_B_2_5  = createVehicle[_HWALL ,[_X +34   ,_Y +22   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_5  setDir 270;         
_R_B_2_6  = createVehicle[_HWALL ,[_X +34   ,_Y +27   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_6  setDir 270;         
_R_B_2_7  = createVehicle[_HWALL ,[_X +34   ,_Y +32.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_7  setDir 270;
_R_B_2_8  = createVehicle[_HWALL ,[_X +34   ,_Y +38   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_8  setDir 270;         
_R_B_2_9  = createVehicle[_HWALL ,[_X +34   ,_Y +43.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_9  setDir 270;         
_R_B_2_10 = createVehicle[_HWALL ,[_X +34   ,_Y +47   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_10 setDir 270;         
_R_B_2_11 = createVehicle[_HWALL ,[_X +34   ,_Y +52   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_B_2_11 setDir 270; 


/*---------------------------------Left--------------------------------------*/

//Bottom Layer                                                                                                              
_L_B_1_1  = createVehicle[_HWALL ,[_X +34   ,_Y +0    ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_1  setDir 270;       
_L_B_1_2  = createVehicle[_HWALL ,[_X +34   ,_Y -5.5  ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_2  setDir 270;       
_L_B_1_3  = createVehicle[_HWALL ,[_X +34   ,_Y -11   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_3  setDir 270;       
_L_B_1_4  = createVehicle[_HWALL ,[_X +34   ,_Y -16.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_4  setDir 270;       
_L_B_1_5  = createVehicle[_HWALL ,[_X +34   ,_Y -22   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_5  setDir 270;       
_L_B_1_6  = createVehicle[_HWALL ,[_X +34   ,_Y -27   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_6  setDir 270;       
_L_B_1_7  = createVehicle[_HWALL ,[_X +34   ,_Y -32.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_7  setDir 270;       
_L_B_1_8  = createVehicle[_HWALL ,[_X +34   ,_Y -38   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_8  setDir 270;       
_L_B_1_9  = createVehicle[_HWALL ,[_X +34   ,_Y -43.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_9  setDir 270;       
_L_B_1_10 = createVehicle[_HWALL ,[_X +34   ,_Y -47   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_10 setDir 270;       
_L_B_1_11 = createVehicle[_HWALL ,[_X +34   ,_Y -52   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_B_1_11 setDir 270;    

//Middle Layer                                                                                                 
_L_B_2_1  = createVehicle[_HWALL ,[_X +34   ,_Y +0    ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_1  setDir 270;         
_L_B_2_2  = createVehicle[_HWALL ,[_X +34   ,_Y -5.5  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_2  setDir 270;         
_L_B_2_3  = createVehicle[_HWALL ,[_X +34   ,_Y -11   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_3  setDir 270;         
_L_B_2_4  = createVehicle[_HWALL ,[_X +34   ,_Y -16.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_4  setDir 270;         
_L_B_2_5  = createVehicle[_HWALL ,[_X +34   ,_Y -22   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_5  setDir 270;         
_L_B_2_6  = createVehicle[_HWALL ,[_X +34   ,_Y -27   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_6  setDir 270;         
_L_B_2_7  = createVehicle[_HWALL ,[_X +34   ,_Y -32.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_7  setDir 270;
_L_B_2_8  = createVehicle[_HWALL ,[_X +34   ,_Y -38   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_8  setDir 270;         
_L_B_2_9  = createVehicle[_HWALL ,[_X +34   ,_Y -43.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_9  setDir 270;         
_L_B_2_10 = createVehicle[_HWALL ,[_X +34   ,_Y -47   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_10 setDir 270;         
_L_B_2_11 = createVehicle[_HWALL ,[_X +34   ,_Y -52   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_B_2_11 setDir 270; 



/*----------------------------------------------------------------------------*/
/*-------------------------------FrontWall------------------------------------*/
/*----------------------------------------------------------------------------*/

/*---------------------------------Right--------------------------------------*/

//Bottom Layer

//_R_F_1_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_1  setDir 270; Hidden to make Gate       
//_R_F_1_2  = createVehicle[_HWALL ,[_X -29   ,_Y +5.5  ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_2  setDir 270; Hidden to make Gate       
_R_F_1_3  = createVehicle[_HWALL ,[_X -29   ,_Y +11   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_3  setDir 270;       
_R_F_1_4  = createVehicle[_HWALL ,[_X -29   ,_Y +16.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_4  setDir 270;       
_R_F_1_5  = createVehicle[_HWALL ,[_X -29   ,_Y +22   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_5  setDir 270;       
_R_F_1_6  = createVehicle[_HWALL ,[_X -29   ,_Y +27   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_6  setDir 270;       
_R_F_1_7  = createVehicle[_HWALL ,[_X -29   ,_Y +32.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_7  setDir 270;       
_R_F_1_8  = createVehicle[_HWALL ,[_X -29   ,_Y +38   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_8  setDir 270;       
_R_F_1_9  = createVehicle[_HWALL ,[_X -29   ,_Y +43.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_9  setDir 270;       
_R_F_1_10 = createVehicle[_HWALL ,[_X -29   ,_Y +47   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_10 setDir 270;       
_R_F_1_11 = createVehicle[_HWALL ,[_X -29   ,_Y +52   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_11 setDir 270;    

//Middle Layer                                                                                                 
//_R_F_2_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_1  setDir 270; Hidden to make Gate        
//_R_F_2_2  = createVehicle[_HWALL ,[_X -29   ,_Y +5.5  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_2  setDir 270; Hidden to make Gate        
_R_F_2_3  = createVehicle[_HWALL ,[_X -29   ,_Y +11   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_3  setDir 270;         
_R_F_2_4  = createVehicle[_HWALL ,[_X -29   ,_Y +16.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_4  setDir 270;         
_R_F_2_5  = createVehicle[_HWALL ,[_X -29   ,_Y +22   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_5  setDir 270;         
_R_F_2_6  = createVehicle[_HWALL ,[_X -29   ,_Y +27   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_6  setDir 270;         
_R_F_2_7  = createVehicle[_HWALL ,[_X -29   ,_Y +32.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_7  setDir 270;
_R_F_2_8  = createVehicle[_HWALL ,[_X -29   ,_Y +38   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_8  setDir 270;         
_R_F_2_9  = createVehicle[_HWALL ,[_X -29   ,_Y +43.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_9  setDir 270;         
_R_F_2_10 = createVehicle[_HWALL ,[_X -29   ,_Y +47   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_10 setDir 270;         
_R_F_2_11 = createVehicle[_HWALL ,[_X -29   ,_Y +52   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_11 setDir 270; 


/*---------------------------------Left--------------------------------------*/

//Bottom Layer                                                                                                              
//_L_F_1_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_1  setDir 270;  //Hidden to make Gate     
//_L_F_1_2  = createVehicle[_HWALL ,[_X -29   ,_Y -5.5  ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_2  setDir 270;  //Hidden to make Gate     
_L_F_1_3  = createVehicle[_HWALL ,[_X -29   ,_Y -11   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_3  setDir 270;       
_L_F_1_4  = createVehicle[_HWALL ,[_X -29   ,_Y -16.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_4  setDir 270;       
_L_F_1_5  = createVehicle[_HWALL ,[_X -29   ,_Y -22   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_5  setDir 270;       
_L_F_1_6  = createVehicle[_HWALL ,[_X -29   ,_Y -27   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_6  setDir 270;       
_L_F_1_7  = createVehicle[_HWALL ,[_X -29   ,_Y -32.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_7  setDir 270;       
_L_F_1_8  = createVehicle[_HWALL ,[_X -29   ,_Y -38   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_8  setDir 270;       
_L_F_1_9  = createVehicle[_HWALL ,[_X -29   ,_Y -43.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_9  setDir 270;       
_L_F_1_10 = createVehicle[_HWALL ,[_X -29   ,_Y -47   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_10 setDir 270;       
_L_F_1_11 = createVehicle[_HWALL ,[_X -29   ,_Y -52   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_11 setDir 270;    

//Middle Layer                                                                                                 
//_L_F_2_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_1  setDir 270;  //Hidden to make Gate       
//_L_F_2_2  = createVehicle[_HWALL ,[_X -29   ,_Y -5.5  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_2  setDir 270;  //Hidden to make Gate        
_L_F_2_3  = createVehicle[_HWALL ,[_X -29   ,_Y -11   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_3  setDir 270;         
_L_F_2_4  = createVehicle[_HWALL ,[_X -29   ,_Y -16.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_4  setDir 270;         
_L_F_2_5  = createVehicle[_HWALL ,[_X -29   ,_Y -22   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_5  setDir 270;         
_L_F_2_6  = createVehicle[_HWALL ,[_X -29   ,_Y -27   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_6  setDir 270;         
_L_F_2_7  = createVehicle[_HWALL ,[_X -29   ,_Y -32.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_7  setDir 270;
_L_F_2_8  = createVehicle[_HWALL ,[_X -29   ,_Y -38   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_8  setDir 270;         
_L_F_2_9  = createVehicle[_HWALL ,[_X -29   ,_Y -43.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_9  setDir 270;         
_L_F_2_10 = createVehicle[_HWALL ,[_X -29   ,_Y -47   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_10 setDir 270;         
_L_F_2_11 = createVehicle[_HWALL ,[_X -29   ,_Y -52   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_11 setDir 270; 


/*----------------------------------------------------------------------------*/
/*----------------------------------GATE--------------------------------------*/
/*----------------------------------------------------------------------------*/
_G_R_1_1  = createVehicle[_HWALL ,[_X -31   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_1  = createVehicle[_HWALL ,[_X -31   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_R_1_2  = createVehicle[_HWALL ,[_X -36   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_2  = createVehicle[_HWALL ,[_X -36   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_R_1_3  = createVehicle[_HWALL ,[_X -41   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_3  = createVehicle[_HWALL ,[_X -41   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_R_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];

_G_L_1_1  = createVehicle[_HWALL ,[_X -31   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_1  = createVehicle[_HWALL ,[_X -31   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_L_1_2  = createVehicle[_HWALL ,[_X -36   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_2  = createVehicle[_HWALL ,[_X -36   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_L_1_3  = createVehicle[_HWALL ,[_X -41   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_3  = createVehicle[_HWALL ,[_X -41   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_L_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];




_CP_L_1_1  = createVehicle[_HWALL ,[_X -29   ,_Y -4  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_L_1_1 setDir 270;
_CP_L_2_1  = createVehicle[_HWALL ,[_X -29   ,_Y -4  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_L_2_1 setDir 270;
_CP_L_1_2  = createVehicle[_HWALL ,[_X -48   ,_Y -4  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_L_1_2 setDir 270;
_CP_L_2_2  = createVehicle[_HWALL ,[_X -48   ,_Y -4  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_L_2_2 setDir 270;
_CP_L_1_3  = createVehicle[_HWALL ,[_X -48   ,_Y -11  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_L_1_3 setDir 270;
_CP_L_2_3  = createVehicle[_HWALL ,[_X -48   ,_Y -11  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_L_2_3 setDir 270;
_CP_L_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y -14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_L_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y -14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_CP_L_1_5  = createVehicle[_HWALL ,[_X -41   ,_Y -14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_L_2_5  = createVehicle[_HWALL ,[_X -41   ,_Y -14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];

_CP_R_1_1  = createVehicle[_HWALL ,[_X -38   ,_Y +4  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_R_1_1 setDir 270;
_CP_R_2_1  = createVehicle[_HWALL ,[_X -38   ,_Y +4  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_R_2_1 setDir 270;
_CP_R_1_2  = createVehicle[_HWALL ,[_X -48   ,_Y +11  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_R_1_2 setDir 270;
_CP_R_2_2  = createVehicle[_HWALL ,[_X -48   ,_Y +11  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_R_2_2 setDir 270;
_CP_R_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y +14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_R_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y +14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_CP_R_1_5  = createVehicle[_HWALL ,[_X -41   ,_Y +14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_R_2_5  = createVehicle[_HWALL ,[_X -41   ,_Y +14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];

_CP_Sign   = createVehicle[_SIGN ,[_X -48   ,_Y -4    ,_Z     ],[],0,"CAN_COLLIDE"]; _CP_Sign setDir 90;

/*----------------------------------------------------------------------------*/
/*-----------------------------Test Area--------------------------------------*/
/*----------------------------------------------------------------------------*/





Edited by rachio
Added new issues & Inquiries.

Share this post


Link to post
Share on other sites

Found a few more issues and added a few more questions.

Share this post


Link to post
Share on other sites

Very cool!

I played around with it and basically decided that you've hit a limitation. It appears that using "CAN_COLLIDE" allows these walls to overlap, but also imposes a height limitation. As soon as you break above 1.6m ATL you get the weird floating thing going on. I did test with "NONE" which allows you to place them as high as you want, but also introduced a weird scattering problem. I also updated a part of your script and renamed the "Definitions.sqf" to "fobDefinitations.sqf" just as a personnel preference.

I put your wall creation into a for loop which allows you to quickly change spacing and such. Only did the side and back wall, the rest would be up to you to do. Also found that your spacing could be tweaked as to avoid placing unnecessary objects. You could probably reduce the number of walls a bit with your current FOB size. If you just reduce one section on each wall you'd save what, anywhere from 8-12 objects with the way you have it laid out. Those #'s can multiply quite quick.

#include "fobDefinitions.sqf"

/*----------------------------------------------------------------------------*/
/*---------------------------------Notes--------------------------------------*/
/*----------------------------------------------------------------------------*/
//Create Object or Vehicle Code
//createVehicle[ **Item** ,[_X,_Y,_Z],[],0,"CAN_COLLIDE"];

//REMINDER: Find out the cause for top layer offset.
//REMINDER: Build IDF Bunkers.
//REMINDER: Add Static mortars.
//REMINDER: Figure out how to make an alarm system using scripted trigger.

/*----------------------------------------------------------------------------*/
/*------------------------------HQ Building-----------------------------------*/
/*----------------------------------------------------------------------------*/
_HQ1 = createVehicle[_HQ,[_X +25 ,_Y  ,_Z   ],[],0,"CAN_COLLIDE"];

_ALARMSYS = createVehicle[_ALARM,[_X +33 ,_Y  ,_Z   ],[],0,"CAN_COLLIDE"];

/*----------------------------------------------------------------------------*/
/*----------------------------Landing Zones-----------------------------------*/
/*----------------------------------------------------------------------------*/
//Middle (Invisible)
_LZ1 = createVehicle[_HELIPADI,[_X     ,_Y     ,_Z   ],[],0,"CAN_COLLIDE"]; _LZ1 setDir 270;

//Left
_LZ2 = createVehicle[_HELIPADS,[_X +20 ,_Y +25 ,_Z   ],[],0,"CAN_COLLIDE"]; _LZ2 setDir 270;

//Right
_LZ3 = createVehicle[_HELIPADS,[_X +20 ,_Y -25 ,_Z   ],[],0,"CAN_COLLIDE"]; _LZ3 setDir 270;

//Left
_Light1 = createVehicle[_LZLight,[_X +25 ,_Y -30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light2 = createVehicle[_LZLight,[_X +25 ,_Y -20 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light3 = createVehicle[_LZLight,[_X +15 ,_Y -30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light4 = createVehicle[_LZLight,[_X +15 ,_Y -20 ,_Z   ],[],0,"CAN_COLLIDE"];

//Right
_Light5 = createVehicle[_LZLight,[_X +25 ,_Y +30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light6 = createVehicle[_LZLight,[_X +25 ,_Y +20 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light7 = createVehicle[_LZLight,[_X +15 ,_Y +30 ,_Z   ],[],0,"CAN_COLLIDE"];
_Light8 = createVehicle[_LZLight,[_X +15 ,_Y +20 ,_Z   ],[],0,"CAN_COLLIDE"];

/*----------------------------------------------------------------------------*/
/*-----------------------------Guard Towers-----------------------------------*/
/*----------------------------------------------------------------------------*/
_T1 = createVehicle[_Tower ,[_X +32 ,_Y +48 ,_Z     ],[],0,"CAN_COLLIDE"];  _T1 setDir 270; //BackWall
_T2 = createVehicle[_Tower ,[_X +32 ,_Y -50 ,_Z     ],[],0,"CAN_COLLIDE"];  _T2 setDir 270; //BackWall
_T3 = createVehicle[_Tower ,[_X -22 ,_Y +48 ,_Z     ],[],0,"CAN_COLLIDE"];  _T3 setDir 90;  //FrontWall
_T4 = createVehicle[_Tower ,[_X -22 ,_Y -50 ,_Z     ],[],0,"CAN_COLLIDE"];  _T4 setDir 90;  //FrontWall

//T1
_GMG1 = createVehicle[_GMG ,[_X +33 ,_Y +47 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG1 setDir 90;  //BackWall
_HMG1 = createVehicle[_HMG ,[_X +33 ,_Y +51 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG1 setDir 90;  //BackWall

//T2
_GMG2 = createVehicle[_GMG ,[_X +33 ,_Y -47 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG2 setDir 90;  //BackWall
_HMG2 = createVehicle[_HMG ,[_X +33 ,_Y -51 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG2 setDir 90;  //BackWall

//T3
_GMG3 = createVehicle[_GMG ,[_X -23 ,_Y +48.5 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG3 setDir 270;  //FrontWall Right
_HMG3 = createVehicle[_HMG ,[_X -23 ,_Y +50.5 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG3 setDir 270;  //FrontWall Right

//T4
_GMG4 = createVehicle[_GMG ,[_X -23 ,_Y -47.5 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _GMG4 setDir 270; //FrontWall Left
_HMG4 = createVehicle[_HMG ,[_X -23 ,_Y -50 ,_Z +4.1 ],[],0,"CAN_COLLIDE"]; _HMG4 setDir 270; //FrontWall Left



/*----------------------------------------------------------------------------*/
/*----------------------------- Side Walls -----------------------------------*/
/*----------------------------------------------------------------------------*/
_sideLenght = 12;
_sideHeight = 3;

/*---------------------------------Right--------------------------------------*/
for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
{
   for [{_i = 0},{_i < _sideLenght},{_i =_i + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + (-25.5 + (5.6 * _i)), _Y + 54, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       sleep 0.1;
   };
};
_wall = nil;
/*---------------------------------Left--------------------------------------*/
for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
{
   for [{_i = 0},{_i < _sideLenght},{_i =_i + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + (-25.5 + (5.6 * _i)), _Y - 54, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
   };
};
_wall = nil;
/*----------------------------------------------------------------------------*/
/*-------------------------------BackWall-------------------------------------*/
/*----------------------------------------------------------------------------*/
_backLenght = 11;
_backHeight = 2;
/*---------------------------------Right--------------------------------------*/
for [{_n = 0},{_n < _backHeight},{_n =_n + 1}] do
{
   for [{_i = 0},{_i < _backLenght},{_i =_i + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + 34, _Y + (5.5 * _i), _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       _wall setDir 270;
   };
};
/*---------------------------------Left--------------------------------------*/
for [{_n = 0},{_n < _backHeight},{_n =_n + 1}] do
{
   for [{_i = 0},{_i < _backLenght},{_i =_i + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + 34, _Y - (5.5 * _i), _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       _wall setDir 270;
   };
};
/*----------------------------------------------------------------------------*/
/*-------------------------------FrontWall------------------------------------*/
/*----------------------------------------------------------------------------*/

/*---------------------------------Right--------------------------------------*/

//Bottom Layer

//_R_F_1_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_1  setDir 270; Hidden to make Gate
//_R_F_1_2  = createVehicle[_HWALL ,[_X -29   ,_Y +5.5  ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_2  setDir 270; Hidden to make Gate
_R_F_1_3  = createVehicle[_HWALL ,[_X -29   ,_Y +11   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_3  setDir 270;
_R_F_1_4  = createVehicle[_HWALL ,[_X -29   ,_Y +16.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_4  setDir 270;
_R_F_1_5  = createVehicle[_HWALL ,[_X -29   ,_Y +22   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_5  setDir 270;
_R_F_1_6  = createVehicle[_HWALL ,[_X -29   ,_Y +27   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_6  setDir 270;
_R_F_1_7  = createVehicle[_HWALL ,[_X -29   ,_Y +32.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_7  setDir 270;
_R_F_1_8  = createVehicle[_HWALL ,[_X -29   ,_Y +38   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_8  setDir 270;
_R_F_1_9  = createVehicle[_HWALL ,[_X -29   ,_Y +43.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_9  setDir 270;
_R_F_1_10 = createVehicle[_HWALL ,[_X -29   ,_Y +47   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_10 setDir 270;
_R_F_1_11 = createVehicle[_HWALL ,[_X -29   ,_Y +52   ,_Z       ],[],0,"CAN_COLLIDE"]; _R_F_1_11 setDir 270;

//Middle Layer
//_R_F_2_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_1  setDir 270; Hidden to make Gate
//_R_F_2_2  = createVehicle[_HWALL ,[_X -29   ,_Y +5.5  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_2  setDir 270; Hidden to make Gate
_R_F_2_3  = createVehicle[_HWALL ,[_X -29   ,_Y +11   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_3  setDir 270;
_R_F_2_4  = createVehicle[_HWALL ,[_X -29   ,_Y +16.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_4  setDir 270;
_R_F_2_5  = createVehicle[_HWALL ,[_X -29   ,_Y +22   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_5  setDir 270;
_R_F_2_6  = createVehicle[_HWALL ,[_X -29   ,_Y +27   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_6  setDir 270;
_R_F_2_7  = createVehicle[_HWALL ,[_X -29   ,_Y +32.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_7  setDir 270;
_R_F_2_8  = createVehicle[_HWALL ,[_X -29   ,_Y +38   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_8  setDir 270;
_R_F_2_9  = createVehicle[_HWALL ,[_X -29   ,_Y +43.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_9  setDir 270;
_R_F_2_10 = createVehicle[_HWALL ,[_X -29   ,_Y +47   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_10 setDir 270;
_R_F_2_11 = createVehicle[_HWALL ,[_X -29   ,_Y +52   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _R_F_2_11 setDir 270;


/*---------------------------------Left--------------------------------------*/

//Bottom Layer
//_L_F_1_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_1  setDir 270;  //Hidden to make Gate
//_L_F_1_2  = createVehicle[_HWALL ,[_X -29   ,_Y -5.5  ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_2  setDir 270;  //Hidden to make Gate
_L_F_1_3  = createVehicle[_HWALL ,[_X -29   ,_Y -11   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_3  setDir 270;
_L_F_1_4  = createVehicle[_HWALL ,[_X -29   ,_Y -16.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_4  setDir 270;
_L_F_1_5  = createVehicle[_HWALL ,[_X -29   ,_Y -22   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_5  setDir 270;
_L_F_1_6  = createVehicle[_HWALL ,[_X -29   ,_Y -27   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_6  setDir 270;
_L_F_1_7  = createVehicle[_HWALL ,[_X -29   ,_Y -32.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_7  setDir 270;
_L_F_1_8  = createVehicle[_HWALL ,[_X -29   ,_Y -38   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_8  setDir 270;
_L_F_1_9  = createVehicle[_HWALL ,[_X -29   ,_Y -43.5 ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_9  setDir 270;
_L_F_1_10 = createVehicle[_HWALL ,[_X -29   ,_Y -47   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_10 setDir 270;
_L_F_1_11 = createVehicle[_HWALL ,[_X -29   ,_Y -52   ,_Z       ],[],0,"CAN_COLLIDE"]; _L_F_1_11 setDir 270;

//Middle Layer
//_L_F_2_1  = createVehicle[_HWALL ,[_X -29   ,_Y +0    ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_1  setDir 270;  //Hidden to make Gate
//_L_F_2_2  = createVehicle[_HWALL ,[_X -29   ,_Y -5.5  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_2  setDir 270;  //Hidden to make Gate
_L_F_2_3  = createVehicle[_HWALL ,[_X -29   ,_Y -11   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_3  setDir 270;
_L_F_2_4  = createVehicle[_HWALL ,[_X -29   ,_Y -16.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_4  setDir 270;
_L_F_2_5  = createVehicle[_HWALL ,[_X -29   ,_Y -22   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_5  setDir 270;
_L_F_2_6  = createVehicle[_HWALL ,[_X -29   ,_Y -27   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_6  setDir 270;
_L_F_2_7  = createVehicle[_HWALL ,[_X -29   ,_Y -32.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_7  setDir 270;
_L_F_2_8  = createVehicle[_HWALL ,[_X -29   ,_Y -38   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_8  setDir 270;
_L_F_2_9  = createVehicle[_HWALL ,[_X -29   ,_Y -43.5 ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_9  setDir 270;
_L_F_2_10 = createVehicle[_HWALL ,[_X -29   ,_Y -47   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_10 setDir 270;
_L_F_2_11 = createVehicle[_HWALL ,[_X -29   ,_Y -52   ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _L_F_2_11 setDir 270;


/*----------------------------------------------------------------------------*/
/*----------------------------------GATE--------------------------------------*/
/*----------------------------------------------------------------------------*/
_G_R_1_1  = createVehicle[_HWALL ,[_X -31   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_1  = createVehicle[_HWALL ,[_X -31   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_R_1_2  = createVehicle[_HWALL ,[_X -36   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_2  = createVehicle[_HWALL ,[_X -36   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_R_1_3  = createVehicle[_HWALL ,[_X -41   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_3  = createVehicle[_HWALL ,[_X -41   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_R_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y +7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_R_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y +7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];

_G_L_1_1  = createVehicle[_HWALL ,[_X -31   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_1  = createVehicle[_HWALL ,[_X -31   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_L_1_2  = createVehicle[_HWALL ,[_X -36   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_2  = createVehicle[_HWALL ,[_X -36   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_L_1_3  = createVehicle[_HWALL ,[_X -41   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_3  = createVehicle[_HWALL ,[_X -41   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_G_L_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y -7.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_G_L_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y -7.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];




_CP_L_1_1  = createVehicle[_HWALL ,[_X -29   ,_Y -4  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_L_1_1 setDir 270;
_CP_L_2_1  = createVehicle[_HWALL ,[_X -29   ,_Y -4  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_L_2_1 setDir 270;
_CP_L_1_2  = createVehicle[_HWALL ,[_X -48   ,_Y -4  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_L_1_2 setDir 270;
_CP_L_2_2  = createVehicle[_HWALL ,[_X -48   ,_Y -4  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_L_2_2 setDir 270;
_CP_L_1_3  = createVehicle[_HWALL ,[_X -48   ,_Y -11  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_L_1_3 setDir 270;
_CP_L_2_3  = createVehicle[_HWALL ,[_X -48   ,_Y -11  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_L_2_3 setDir 270;
_CP_L_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y -14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_L_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y -14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_CP_L_1_5  = createVehicle[_HWALL ,[_X -41   ,_Y -14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_L_2_5  = createVehicle[_HWALL ,[_X -41   ,_Y -14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];

_CP_R_1_1  = createVehicle[_HWALL ,[_X -38   ,_Y +4  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_R_1_1 setDir 270;
_CP_R_2_1  = createVehicle[_HWALL ,[_X -38   ,_Y +4  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_R_2_1 setDir 270;
_CP_R_1_2  = createVehicle[_HWALL ,[_X -48   ,_Y +11  ,_Z       ],[],0,"CAN_COLLIDE"]; _CP_R_1_2 setDir 270;
_CP_R_2_2  = createVehicle[_HWALL ,[_X -48   ,_Y +11  ,_Z +1.2  ],[],0,"CAN_COLLIDE"]; _CP_R_2_2 setDir 270;
_CP_R_1_4  = createVehicle[_HWALL ,[_X -46   ,_Y +14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_R_2_4  = createVehicle[_HWALL ,[_X -46   ,_Y +14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];
_CP_R_1_5  = createVehicle[_HWALL ,[_X -41   ,_Y +14.5    ,_Z       ],[],0,"CAN_COLLIDE"];
_CP_R_2_5  = createVehicle[_HWALL ,[_X -41   ,_Y +14.5    ,_Z +1.2  ],[],0,"CAN_COLLIDE"];

_CP_Sign   = createVehicle[_SIGN ,[_X -48   ,_Y -4    ,_Z     ],[],0,"CAN_COLLIDE"]; _CP_Sign setDir 90;

/*----------------------------------------------------------------------------*/
/*-----------------------------Test Area--------------------------------------*/
/*----------------------------------------------------------------------------*/

I'm not sure exactly what your trying to with the "description.ext". In my opinion, your best bet is to keep using #include how you have it already since those variables should terminate after the script has finished.

As for playing a sound when the enemy is in range, I am unfamiliar with sounds atm but you can run a periodic check to see if any enemies are near you marker, and then execute the sound if true.

fnc_CountEnemy =
{
_cntOpPrim = {(alive _x && (side _x) == opfor) && ((_x distance getMarkerPos format ["%1", mainObjective]) < _disMark)} count allUnits;
// Return
_cntOpPrim
};

_enemyCount = call fnc_CountEnemy;
if (_enemyCount > 0) then
{ "Your Code" };

// Replace mainObjective with your marker and _disMark is the distance to marker

Share this post


Link to post
Share on other sites

I'm afraid I haven't looked over this much at all, but hopefully there is a command that might be of at least some help.

If you use "setVectorUp" you can basically align an object's vertical orientation so it is upright (or not). The way to get a piece to be perfectly upright is:

object setVectorUp [0,0,1];

This makes the model's "UP" vector correspond to the positive z-axis of the world's coordinates. Essential with static weapons and putting things on roofs, etc.

Share this post


Link to post
Share on other sites

dwringer, that helps out a bit. Fixed the issue with them being slanted and floating, however the 3rd row stacked high would still float above the other two rows.

I just ran a test with offsetting them by 0.5m each row so they're not perfectly aligned vertically and that allowed the 3rd row to sit flush.

For anyone interested here's the adjusted statement that allowed the 3rd row to sit flush:

for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
{
   for [{_i = 0},{_i < _sideLenght},{_i =_i + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + (-25.5 + (5.6 * _i)), _Y + (54 - (_n * 0.5)), _Z + (1.3 * _n)],[],0,"CAN_COLLIDE"];
       _wall setVectorUp [0,0,1];
       sleep 0.1;
   };
};

Result would still look funny unless you created a pyramid. The only other thing I can think of to try is attachto, have not used that yet though so need to experiment some with it.

Edit >-- attachTo works --

Edited by King_Richard

Share this post


Link to post
Share on other sites

First of all, thank you guys so very much with taking the time to help! This is awesome! I didn't know that there was an actual method to duplicate stuff from one command. Heck, it took me almost 3 days to figure out how to do the create vehicle code up in the notes... If it's not too much trouble can you break the code down a bit and explain the theory behind it? All I can get from looking at it is "This is black magic and he is trained in the arts of the dark-side".

Share this post


Link to post
Share on other sites

Alright, got back and worked it out!

_sideLenght = 10;
_sideHeight = 5;

arrayWall = [];
//-------------------------Right-------------------------
for [{_i = 0},{_i < _sideLenght},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + (-25.5 + (5.6 * _i)), _Y + 54, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       arrayWall = arrayWall + [_wall];
       sleep 0.1;
       if (_n > 1) then
       {
           _index = (_sideHeight * _i) + (_n - 1);
           _wall attachTo [(arrayWall select _index), [0,0,1.2]];
       };
   };
};
arrayWall = 0;
// At the end of the script ensure you terminate this array with
// arrayWall = nil;

I would set this up as a function so you can just pass along the height and length for creating your stacked H-Wall.

I'll work on commenting it and get back to ya. Not sure how long it'll take though, depends on the kids :)

Edited by King_Richard
+response to above post

Share this post


Link to post
Share on other sites
Alright, got back and worked it out!

I would set this up as a function so you can just pass along the height and length for creating your stacked H-Wall.

I'll work on commenting it and get back to ya. Not sure how long it'll take though, depends on the kids :)

That's perfectly fine, life should always be a priority. I've been busy with work myself, hence the late gratitude, lol! As for setting it up as a function, as mentioned before, I'm not well versed in scripting/programming so I'm unfamiliar with the term and application.

Also, any clue as to why the guard towers have different coordinates? If they all start form the 0 position, shouldn't it just be a '-' & a '+' variant instead of two separate numbers??

(Not sure if this pertains to the function recommendation, but I tried applying the array to the back wall but only one line actually takes up the direction.)

Edited by rachio

Share this post


Link to post
Share on other sites

Added some comments and hints to try and help ya visualize what's going on. Sorry about jumping the gun there, assumed you had some prior programming knowledge since your script was well organized.

Assuming your unfamiliar with a for loop then, a for loop lets you define a variable, {_i = 0}, set a condition to run the loop until that condition is false {_i < _sideLength} and you can set it to increment _i after it runs through it's block of code {_i = _i + 1}. If you still have troubles with it then I'd recommend checking out some starter C++ tutorials to at least get familiar with the basics since majority of that will transfer to arma.

And disregard the setting up a function. Looking at it, all of your stuff is offset at different values or starts at a different value for your positions. Just try to apply what I posted to the rest of the walls and then take it from there.

Also, I don't get what your saying about two different numbers for the guard tower.

_sideLength = 10;   // Variable used for setting the length of the wall
_sideHeight = 5;    // Variable used for setting the height of the wall

arrayWall = [];     // Global variable used for storing the individual wall ID's so we can reference to them later
//-------------------------Right-------------------------

// I set up some sleeps and hints to try and help visualize what's going on
for [{_i = 0},{_i < _sideLength},{_i =_i + 1}] do // for loop that'll run until we hit the end of _sideLength
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do // for loop that'll run until we reach our set height
   {
   // each H-Wall is spaced about 5.6m in length leaving no visible gap, _i is the section of length we are on so we can multiply 5.6 by _i to get the correct spacing
   // the first piece is always 0, in arrays the first entry is index 0, hence the reason we can multiply 5.6 by _i since the starter will be _i = 0, same for _n
   // 1.2 works out well for the height but could be tweaked possibly a tad and we multiply 1.2 by _n since _n is the height segment we are on currently in this for loop
       _wall = createVehicle [_HWALL,[_X + (-25.5 + (5.6 * _i)), _Y + 54, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];

   // here's our array that we'll use to store the id's of the wall so we can reference to it when needed, we are adding to it _wall each time we create a new piece
       arrayWall = arrayWall + [_wall];
       sleep 0.1;

       hint format ["Height _n: " + "%1" + "    Length _i: " + "%2", _n, _i ];
           sleep 5;

   // if _n is greater then one then we just created the 3rd tier _n will be 2 or greater, 0 1 2 <- 3 numbers, 3rd tier
       if (_n > 1) then
       {
           // to make this thing semi modular it's set up so that we can create any height of wall we want simply by attaching each piece to the one below it
           // in this example _n can be 0-4, since we've confirmed _n is greater than 1 we go ahead and subtract 1 to get the index number below us
           _index = (_sideHeight * _i) + (_n - 1);
           // now we can attach the piece to the wall at 1.2m above that piece
           _wall attachTo [(arrayWall select _index), [0,0,1.2]];
           hint format ["Piece to Attach to _index: " + "%1", _index];
           sleep 8;
           hint format ["Height _n: " + "%1" + "    Length _i: " + "%2", _n, _i ];
           sleep 8;
           _CurrentIndex = (_sideHeight * _i) + (_n);
           hint format ["Current Index Nmbr: " + "%1", _CurrentIndex];
           sleep 8;
       };
   };
};
arrayWall = 0;

Share this post


Link to post
Share on other sites

Okay, that makes it a lot easier now that I somewhat understand the concept! (The 0 = 1 bit was throwing me off a bit, I must admit.) As for my organization, I guess the reason is because I'm a logistics specialist in the military. Organization is a required skill in logistics otherwise things come back to bite you. For the Guard towers, I'm referring to this

_T1           = createVehicle[_Tower,  [_X +32 ,_Y +48 ,_Z     ],[],0,"CAN_COLLIDE"];  _T1 setDir 270; //BackWall
_T2           = createVehicle[_Tower,  [_X +32 ,_Y -50 ,_Z     ],[],0,"CAN_COLLIDE"];  _T2 setDir 270; //BackWall
_T3           = createVehicle[_Tower,  [_X -22 ,_Y +48 ,_Z     ],[],0,"CAN_COLLIDE"];  _T3 setDir 90;  //FrontWall
_T4           = createVehicle[_Tower,  [_X -22 ,_Y -50 ,_Z     ],[],0,"CAN_COLLIDE"];  _T4 setDir 90;  //FrontWall

If you notice, the Y axis is different values. I know I was horrible in math, but... If you go 48 in both directions, you should end up equal distances. Like the walls for example were +/- 53 from 0 and have the same relative position in the template. Where-as if the towers were placed with the same value one would be slightly father away from the wall. (I'm horrible at explaining, please forgive me if I'm not making sense.)

On a side note, I've been combing different sites trying to find an answer for my rotation problem. I'm wondering from the various info I found if some form of magic combo of setDir, markerDir, and getDir would work to solve that?

Share this post


Link to post
Share on other sites

The 0 = 1 still throws me off at times too. And I deal with it on a daily basis in networking. The organization makes sense now!

Ah, now I see what your saying. You could just adjust it to -50 and +50 for those or vise versa, lol. I don't know why it's defaulted that way, I assumed you built it, but now I see in the first post that your deciphering various scripts. So, who ever built it probably just copied the code from the build into a file and called it good? From what I'm seeing on it, all distances need to be tweaked and I keep tinkering with it off and on as well. I like the design of this fob excepts for the gate and the grenade launchers.

To rotate all of it, I'd imagine it would be a combination of markerDir and such. Not sure how to tackle that one yet though as I've not dealt with modifying objects that way yet.

Share this post


Link to post
Share on other sites

Honestly, I'm not a big fan of the gate either. I just made it that way to be more fluid/durable & that was the only place I could place AA(Hopefully in the future the CRAM addon in production) where they'd have best visibility. Originally, this was the mock concept I made in the editor (Bunkers & towers were part of a template i found on armaholic) http://steamcommunity.com/sharedfiles/filedetails/?id=237527459 The G-Launchers were added to fight tanks since there's no raised AG/AA. After I got a general ideal of what I wanted I began to make this script

_POS = (getmarkerPos "Base");
_X =  (_POS select 0);
_Y =  (_POS select 1);
_Z =  (_POS select 2);
_HWALL = "Land_HBarrier_5_F";



//-----------------------Buidling & Assets---------------------------



//HeadQuarters
"Land_Cargo_HQ_V1_F" createVehicle [(_POS select 0)+(25), (_POS select 1)+(0)];

//Helipads
HP1 = "Land_HelipadSquare_F" createVehicle [(_POS select 0)+(20), (_POS select 1)+(-25)];
HP1 setDir 270;
HP2 = "Land_HelipadSquare_F" createVehicle [(_POS select 0)+(20), (_POS select 1)+(25)];
HP2 setDir 270;


//Guard tower 1
GT1 = "Land_Cargo_Patrol_V1_F" createVehicle [(_POS select 0)+(32), (_POS select 1)+(48)];
GT1 setDir 270;

//Guard tower 2
GT2 = "Land_Cargo_Patrol_V1_F" createVehicle [(_POS select 0)+(32), (_POS select 1)+(-50)];
GT2 setDir 270;

//Guard tower 3
GT1 = "Land_Cargo_Patrol_V1_F" createVehicle [(_POS select 0)+(-22), (_POS select 1)+(48)];
GT1 setDir 90;

//Guard tower 4
GT2 = "Land_Cargo_Patrol_V1_F" createVehicle [(_POS select 0)+(-22), (_POS select 1)+(-50)];
GT2 setDir 90;














//--------------------Right Side-----------------------------

//
//Right Top Layer
//

createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-20.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-15.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-10.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-5.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(0), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];  //MIDDLE WALL
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(5.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(10.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(15.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(20.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(25.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(30.5), (_POS select 1)+(54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(29), (_POS select 1)+(45),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
//
//Right Middle Layer
//

createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-20.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-15.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-10.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-5.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(0), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];  //MIDDLE WALL
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(5.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(10.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(15.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(20.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(25.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(30.5), (_POS select 1)+(54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(29), (_POS select 1)+(45),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
//
//Right Bottom layer
//

createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-20.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-15.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-10.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-5.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(0), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];  //MIDDLE WALL
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(5.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(10.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(15.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(20.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(25.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(30.5), (_POS select 1)+(54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(29), (_POS select 1)+(45)],[],0,"CAN_COLLIDE"];


//
//Right Backwall 3rd layer
//

RBR=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(0),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR setDir 270;
RBR1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(5.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR1 setDir 270;
RBR2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(11),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR2 setDir 270;
RBR3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(16.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR3 setDir 270;
RBR4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(22),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR4 setDir 270;
RBR5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(27),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR5 setDir 270;
RBR6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(32.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR6 setDir 270;
RBR7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(38),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR7 setDir 270;
RBR8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(43.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR8 setDir 270;
RBR9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(47),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR9 setDir 270;
RBR10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(52),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RBR10 setDir 270;

//
//Right Backwall Middle layer
//

RBM=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(0),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM setDir 270;
RBM1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(5.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM1 setDir 270;
RBM2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(11),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM2 setDir 270;
RBM3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(16.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM3 setDir 270;
RBM4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(22),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM4 setDir 270;
RBM5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(27),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM5 setDir 270;
RBM6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(32.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM6 setDir 270;
RBM7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(38),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM7 setDir 270;
RBM8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(43.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM8 setDir 270;
RBM9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(47),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM9 setDir 270;
RBM10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(52),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RBM10 setDir 270;


//
//Right Backwall bottom layer
//

RBB=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(0)],[],0,"CAN_COLLIDE"];
RBB setDir 270;
RBB1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(5.5)],[],0,"CAN_COLLIDE"];
RBB1 setDir 270;
RBB2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(11)],[],0,"CAN_COLLIDE"];
RBB2 setDir 270;
RBB3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(16.5)],[],0,"CAN_COLLIDE"];
RBB3 setDir 270;
RBB4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(22)],[],0,"CAN_COLLIDE"];
RBB4 setDir 270;
RBB5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(27)],[],0,"CAN_COLLIDE"];
RBB5 setDir 270;
RBB6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(32.5)],[],0,"CAN_COLLIDE"];
RBB6 setDir 270;
RBB7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(38)],[],0,"CAN_COLLIDE"];
RBB7 setDir 270;
RBB8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(43.5)],[],0,"CAN_COLLIDE"];
RBB8 setDir 270;
RBB9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(47)],[],0,"CAN_COLLIDE"];
RBB9 setDir 270;
RBB10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(52)],[],0,"CAN_COLLIDE"];
RBB10 setDir 270;

//
//Right Frontwall Top layer
//

RFT=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(0),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFT setDir 270;
RFT1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(5.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT1 setDir 270;
RFT2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(11),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT2 setDir 270;
RFT3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(16.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT3 setDir 270;
RFT4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(22),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT4 setDir 270;
RFT5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(27),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT5 setDir 270;
RFT6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(32.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT6 setDir 270;
RFT7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(38),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT7 setDir 270;
RFT8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(43.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT8 setDir 270;
RFT9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(47),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT9 setDir 270;
RFT10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(52),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFT10 setDir 270;

//
//Right Frontwall Middle layer
//

RFM=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(0),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
RFM setDir 270;
RFM1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(5.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM1 setDir 270;
RFM2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(11),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM2 setDir 270;
RFM3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(16.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM3 setDir 270;
RFM4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(22),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM4 setDir 270;
RFM5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(27),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM5 setDir 270;
RFM6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(32.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM6 setDir 270;
RFM7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(38),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM7 setDir 270;
RFM8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(43.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM8 setDir 270;
RFM9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(47),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM9 setDir 270;
RFM10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(52),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
RFM10 setDir 270;


//
//Right Frontwall bottom layer
//

RFB=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(0)],[],0,"CAN_COLLIDE"];
RFB setDir 270;
RFB1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(5.5)],[],0,"CAN_COLLIDE"];
RFB1 setDir 270;
RFB2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(11)],[],0,"CAN_COLLIDE"];
RFB2 setDir 270;
RFB3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(16.5)],[],0,"CAN_COLLIDE"];
RFB3 setDir 270;
RFB4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(22)],[],0,"CAN_COLLIDE"];
RFB4 setDir 270;
RFB5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(27)],[],0,"CAN_COLLIDE"];
RFB5 setDir 270;
RFB6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(32.5)],[],0,"CAN_COLLIDE"];
RFB6 setDir 270;
RFB7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(38)],[],0,"CAN_COLLIDE"];
RFB7 setDir 270;
RFB8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(43.5)],[],0,"CAN_COLLIDE"];
RFB8 setDir 270;
RFB9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(47)],[],0,"CAN_COLLIDE"];
RFB9 setDir 270;
RFB10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(52)],[],0,"CAN_COLLIDE"];
RFB10 setDir 270;






//----------------Left Side-----------------------------

//
//Left Top Layer
//

createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-20.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-15.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-10.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-5.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(0), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];  //MIDDLE WALL
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(5.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(10.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(15.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(20.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(25.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(30.5), (_POS select 1)+(-54),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(29), (_POS select 1)+(-44),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];

//
//Left Middle Layer
//

createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-20.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-15.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-10.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-5.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(0), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];  //MIDDLE WALL
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(5.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(10.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(15.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(20.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(25.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(30.5), (_POS select 1)+(-54),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(29), (_POS select 1)+(-44),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];

//
//Left Bottom Layer
//

createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-25.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-20.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-15.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-10.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-5.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(0), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];  //MIDDLE WALL
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(5.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(10.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(15.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(20.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(25.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(30.5), (_POS select 1)+(-54)],[],0,"CAN_COLLIDE"];
createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(29), (_POS select 1)+(-44)],[],0,"CAN_COLLIDE"];



//
//Left Backwall Top layer
//

LBT=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(0),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT setDir 270;
LBT1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-5.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT1 setDir 270;
LBT2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-11),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT2 setDir 270;
LBT3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-16.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT3 setDir 270;
LBT4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-22),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT4 setDir 270;
LBT5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-27),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT5 setDir 270;
LBT6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-32.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT6 setDir 270;
LBT7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-38),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT7 setDir 270;
LBT8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-43),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT8 setDir 270;
LBT9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-47),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT9 setDir 270;
LBT10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-52),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LBT10 setDir 270;

//
//Left Backwall Middle layer
//

LBM=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(0),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM setDir 270;
LBM1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-5.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM1 setDir 270;
LBM2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-11),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM2 setDir 270;
LBM3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-16.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM3 setDir 270;
LBM4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-22),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM4 setDir 270;
LBM5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-27),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM5 setDir 270;
LBM6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-32.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM6 setDir 270;
LBM7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-38),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM7 setDir 270;
LBM8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-43.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM8 setDir 270;
LBM9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-47),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM9 setDir 270;
LBM10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-52),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LBM10 setDir 270;

//
//Left Backwall bottom layer
//

LBB=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(0)],[],0,"CAN_COLLIDE"];
LBB setDir 270;
LBB1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-5.5)],[],0,"CAN_COLLIDE"];
LBB1 setDir 270;
LBB2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-11)],[],0,"CAN_COLLIDE"];
LBB2 setDir 270;
LBB3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-16.5)],[],0,"CAN_COLLIDE"];
LBB3 setDir 270;
LBB4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-22)],[],0,"CAN_COLLIDE"];
LBB4 setDir 270;
LBB5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-27)],[],0,"CAN_COLLIDE"];
LBB5 setDir 270;
LBB6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-32.5)],[],0,"CAN_COLLIDE"];
LBB6 setDir 270;
LBB7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-38)],[],0,"CAN_COLLIDE"];
LBB7 setDir 270;
LBB8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-43.5)],[],0,"CAN_COLLIDE"];
LBB8 setDir 270;
LBB9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-47)],[],0,"CAN_COLLIDE"];
LBB9 setDir 270;
LBB10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(34), (_POS select 1)+(-52)],[],0,"CAN_COLLIDE"];
LBB10 setDir 270;


//
//Left Frontwall Top layer
//

LFT=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(0),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT setDir 270;
LFT1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-5.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT1 setDir 270;
LFT2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-11),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT2 setDir 270;
LFT3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-16.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT3 setDir 270;
LFT4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-22),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT4 setDir 270;
LFT5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-27),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT5 setDir 270;
LFT6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-32.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT6 setDir 270;
LFT7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-38),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT7 setDir 270;
LFT8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-43.5),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT8 setDir 270;
LFT9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-47),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT9 setDir 270;
LFT10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-52),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFT10 setDir 270;

//
//Left Frontwall Middle layer
//

LFM=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(0),(_POS select 2)+(2.2)],[],0,"CAN_COLLIDE"];
LFM setDir 270;
LFM1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-5.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM1 setDir 270;
LFM2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-11),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM2 setDir 270;
LFM3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-16.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM3 setDir 270;
LFM4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-22),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM4 setDir 270;
LFM5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-27),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM5 setDir 270;
LFM6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-32.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM6 setDir 270;
LFM7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-38),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM7 setDir 270;
LFM8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-43.5),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM8 setDir 270;
LFM9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-47),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM9 setDir 270;
LFM10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-52),(_POS select 2)+(1.2)],[],0,"CAN_COLLIDE"];
LFM10 setDir 270;


//
//Left Frontwall bottom layer
//

LFB=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(0)],[],0,"CAN_COLLIDE"];
LFB setDir 270;
LFB1=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-5.5)],[],0,"CAN_COLLIDE"];
LFB1 setDir 270;
LFB2=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-11)],[],0,"CAN_COLLIDE"];
LFB2 setDir 270;
LFB3=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-16.5)],[],0,"CAN_COLLIDE"];
LFB3 setDir 270;
LFB4=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-22)],[],0,"CAN_COLLIDE"];
LFB4 setDir 270;
LFB5=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-27)],[],0,"CAN_COLLIDE"];
LFB5 setDir 270;
LFB6=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-32.5)],[],0,"CAN_COLLIDE"];
LFB6 setDir 270;
LFB7=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-38)],[],0,"CAN_COLLIDE"];
LFB7 setDir 270;
LFB8=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-43.5)],[],0,"CAN_COLLIDE"];
LFB8 setDir 270;
LFB9=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-47)],[],0,"CAN_COLLIDE"];
LFB9 setDir 270;
LFB10=createVehicle ["Land_HBarrier_5_F",[(_POS select 0)+(-29), (_POS select 1)+(-52)],[],0,"CAN_COLLIDE"];
LFB10 setDir 270;





Then I did some deciphering/organizing and that's the point where I created the thread. And I'm confused on what you mean by tweak all the distances? Currently with the for loop you showed me I've make length 10, height 4(5 blocks the towers) for the walls if that's what you mean?

Share this post


Link to post
Share on other sites

For distances, I went ahead and put the rest of the walls into loops and had to make various, but small adjustments to some of the starting points and such. And I see the reason for the gl's now. Didn't think of that as an alternative to the missile launchers.

Share this post


Link to post
Share on other sites

Here's something cool!

I've now set it up to take the input from the size of the marker to build the FOB. All that is needed now is to figure out how to rotate all of these objects as one, and add in some of the other buildings like the HQ and helipad if the FOB is bigger then some set size. A 60 x 60 marker will give you a 10 x 10. Smallest I've tested was a 20 x 20 but that was before I added the towers. With the towers, a FOB that small is pretty funny looking. Will have to add some minimum size checks as well. Only removed a section for the "gate" or entrance for now as well.

#include "fobDefinitions.sqf"
//------------------------------ Front is Facing Gate ---------------------------------------------

// Get the marker Size and convert into # of segments for the length and width
_markSize = getMarkerSize "Base_1";
_Length = round floor ((_markSize select 0) / 5.6);
_Width = round floor ((_markSize select 1) / 5.6);
_sideHeight = 3;

hint format ["Length: " + "%1" + " Width: " + "%2", _Length, _Width];
sleep 2;

//-------------------------SideWall-Calculations------------------------
_Yspacing = (((_Width + 1) * 5.6) - 4) * 0.5;   // this - 0 + this
_Xstart = 0 - (((_Length * 5.6) - 5) * 0.5);    // -5 used to set alignment
//-------------------------Back/Front/Wall-Calculations------------------------
_Ystart = (5.6 * (_Width - 1)) * 0.5;       // -1 to account for side widths
_Xspacing = ((5.6 * _Length) * 0.5) - 1;    // -1 used to set alignment
_midSection = round floor (_Width * 0.5);   // Used to remove section from Front Wall

_tLength = _Xstart + (_Length * 5.6);   // Used for setting corner objects
//------------------------Towers---------------------------------
// Back Wall - or - East Wall
_T = createVehicle[_Tower ,[ _X + (_tLength - 6), _Y + (_Yspacing - 6), _Z],[],0,"CAN_COLLIDE"];
_T setDir 270;
sleep 0.1;
_T = createVehicle[_Tower ,[ _X + (_tLength - 6), _Y - (_Yspacing - 4), _Z],[],0,"CAN_COLLIDE"];
_T setDir 270;
// Front Wall - or - West Wall
_T = createVehicle[_Tower ,[ _X + (_Xstart + 5), _Y + (_Yspacing - 6), _Z],[],0,"CAN_COLLIDE"];
_T setDir 90;
sleep 0.1;
_T = createVehicle[_Tower ,[ _X + (_Xstart + 5), _Y - (_Yspacing - 4), _Z],[],0,"CAN_COLLIDE"];
_T setDir 90;



_wall = 0;
//------------------------Create-SideWalls-akaLength---------------------------------

_arrayWall = [];
for [{_i = 0},{_i < (_Length * 2)},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       if (_i < _Length) then // Left Wall
       {
           _wall = createVehicle [_HWALL,[_X + (_Xstart + (5.6 * _i)), _Y + _Yspacing, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       };
       if (_i >= _Length) then // Right Wall
       {
           _wall = createVehicle [_HWALL,[_X + (_Xstart + (5.6 * (_i - _Length))), _Y - _Yspacing, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       };
       _arrayWall = _arrayWall + [_wall];
       sleep 0.05;
       if (_n > 1) then
       {
           _index = (_sideHeight * _i) + (_n - 1);
           _wall attachTo [(_arrayWall select _index), [0,0,1.2]];
       };
   };
};
//------------------------Create-BackWall-akaWidth------------------------------
_arrayWall = [];
for [{_i = 0},{_i < _Width},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + _Xspacing, ((_Y - _Ystart) + (5.6 * _i)), _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       _wall setDir 270;
       _arrayWall = _arrayWall + [_wall];
       sleep 0.05;
       if (_n > 1) then
       {
           _index = (_sideHeight * _i) + (_n - 1);
           _wall attachTo [(_arrayWall select _index), [0,0,1.2]];
       };
   };
};
_arrayWall = 0;
//------------------------Create-FrontWall-akaWidth------------------------
_arrayWall = [];
for [{_i = 0},{_i < _Width},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       if (_midSection != _i) then
       {
           _wall = createVehicle [_HWALL,[_X - (_Xspacing + 0.5), ((_Y - _Ystart) + (5.6 * _i)), _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
           _wall setDir 270;
           _arrayWall = _arrayWall + [_wall];
           sleep 0.05;
           if (_n > 1) then
           {
               _index = (_sideHeight * _i) + (_n - 1);
               _wall attachTo [(_arrayWall select _index), [0,0,1.2]];
           };
       };
       if (_midSection == _i) then
       {
           // Todo, add the military sign
           // Add in some gates
           // Or make some other contraption?
       };
   };
};
_arrayWall = 0;

I'm not sure if this is what your after, but this is similar to what I had in mind for setting up a generic FOB that could serve as a template for others to build off of.

To rotate the entire thing, these objects are probably all going to have to go into an array and then use some sort of transformation, but unsure of what is available in arma for that sort of thing.

Share this post


Link to post
Share on other sites

Oh, man! It was like X-mas morning when I saw that build!!! That's absolutely awesome! Though, I'm wondering it's possible to apply that method to triggers? If we can, the trigger box will be a awesome visual indicator as to what it will look like when we have a finished template. Also, I found a better place for the AA defense issue. If you set a Cheetah on top of the HQ it not only has a awesome field of view, it actually doesn't look to bad as a defensive object/cover for HQ personnel.

I'll be studying the code later after work, but is there a reason for the 1/6 ratio on the size calculation(?) and for the 60 X 60 configuration, the enterance seems a bit skewed to the right rather than in the middle(Unsure if intended or not since I only briefly had time to check it out).

(I also apologize if the term "We" is offensive, lol. This is clearly your awesome work now~ I would have never been able to do this on my own, but then again I've always been more of a theory than practice kind of guy.)

Share this post


Link to post
Share on other sites

Lol, got a kick outta the x-mas morning analogy.

- Could always set the marker to border and get the same effect. I like using the markers since I feel as though I have more control with them, and I've got some other stuff going on with markers.

- An entire vehicle on top of the HQ huh, hmm, I'd have to see that one. Sounds cool, but not sure how authentic it'd feel, lol.

- The 1/6 ratio is due to the fact that each h-wall is roughly 5.6m long.

The entrance is off centered if there's an even number of wall sections on the front. Did it that way because my mind blanked out when I was thinking of possible scenarios and spacing issues for leaving the entrance exactly in the middle and being exactly x in size and if there'd be exactly x space left over for all of the h-walls to fit perfectly. Just figured one section removed would be the easiest for placing other things near the entrance.

I tried searching around for how to rotate multiple objects as a group and didn't come up with anything, I thought there'd be a few commands for accomplishing such task. The only alternative I see is to actually do the math behind it and I'm pretty rusty in the trig area.

And no I am not offended by "We". Was actually wondering the same thing, felt as though I perhaps "overstepped" for lack of a better word.

Share this post


Link to post
Share on other sites

Lol, by no means did you overstep anything! The main goal of this in the first place was to have something people can have fun with. Personally, if I can accomplish that, people can have the credit if the initial concept meets that requirement. As for an entire vehicle being on a roof, surprisingly I have seen it done here in Afghanistan. But it is more typical to see a traditional CRAM with a static platform on a building or trailer instead of having a tracked vehicle as it's base. For the markers, is there a way so you don't get the huge icon or are you scripting your markers?

(I've been playing around with some "If then" commands to experiment and it's pretty cool to have it dynamically turn into different FOBS based on size. For example, 5x5 is just a HQ, 10x10 is walls + HQ, 20 x20 is basically original start point)

Edited by rachio

Share this post


Link to post
Share on other sites

I messed up when getting the size of the marker. Completely slipped my mind that the markers use radius instead of diameter. So, the fixed code is

_Length = round floor (((_markSize select 0) * 2) / 5.6);
_Width = round floor (((_markSize select 1) * 2) / 5.6);

That might fix the large Icon issue! And yes my markers are scripted, except for the FOB atm since it's in production phase.

However, there's a good chance that the "5.6" measurement will change. Just found that I can actually get the size of an object and then compute from there which is what I'll be working on later. So, the hard measurements that I've defined will likely be replaced with variables. That way you could change the type of wall if needed too.

I've simplified the rotating issue, but I still need to brush up on some math before I can start piecing that portion together. I did test out one wall and was able to align it, but I just used estimates for the placements instead of trig.

Hopefully when you get the sizes down and their default designs I'll be done with the rotation so we can merge the results. Depending on my cold and the weather it may take a few days though. Gonna have to go look for pictures of vehicles on buildings now, lol.

Share this post


Link to post
Share on other sites

That'll actually give me some time do to some design concepts, regardless I hope you feel better, man! Since I figured out about these IF/Then things, that totally opened up new horizons for my (average) creativity since I'm not limited by just one template.

The vehicle on the building I think was just a once in a life time experience, lol! IIRC(As it's been like 6 months for a breif glimpse), it was some sort of CROWS system vehicle on top of a field building. (Like the ones in game but slightly different) overlooking a wall. It could've have just been a makeshift deal since they were installing towers and wall segments.

11X11 Concept:

#include "define.hpp"

//------------------------------ Front is Facing Gate ---------------------------------------------

// Get the marker Size and convert into # of segments for the length and width
_markSize = getMarkerSize "Base_1";
_Length = round floor (_markSize select 0);
_Width = round floor (_markSize select 1);
_sideHeight = 3;

hint format ["Length: " + "%1" + " Width: " + "%2", _Length, _Width];
sleep 2;


//11X11 Varient
if ((_Length >= 11) && (_Width >=11)) then {

//-------------------------SideWall-Calculations------------------------
_Yspacing = (((_Width + 1) * 5.6) - 4) * 0.5;   // this - 0 + this
_Xstart = 0 - (((_Length * 5.6) - 5) * 0.5);    // -5 used to set alignment
//-------------------------Back/Front/Wall-Calculations------------------------
_Ystart = (5.6 * (_Width - 1)) * 0.5;       // -1 to account for side widths
_Xspacing = ((5.6 * _Length) * 0.5) - 1;    // -1 used to set alignment
_midSection = round floor (_Width * 0.5);   // Used to remove section from Front Wall

_tLength = _Xstart + (_Length * 5.6);   // Used for setting corner objects

//------------------------Items/buildings---------------------------------

_H1 = createVehicle [_HQ,[_X + ((_Xspacing/5.6)*4), (_Y+(_Width/5.6)), _Z ],[],0,"CAN_COLLIDE"];
_LZ = createVehicle ["Land_HelipadCircle_F",[_X + (_Xspacing/10), (_Y+(_Width/5.6)*-10), _Z ],[],0,"CAN_COLLIDE"];
_Water1 = createVehicle ["Land_WaterTank_F",[_X + ((_Xspacing/5.6)*5), (_Y+(_Width/5.6)*-2.5), _Z ],[],0,"CAN_COLLIDE"];
_Water2 = createVehicle ["Land_WaterTank_F",[_X + ((_Xspacing/5.6)*4.5), (_Y+(_Width/5.6)*-2.5), _Z ],[],0,"CAN_COLLIDE"];
_B1 = createVehicle ["Land_Cargo_House_V1_F",[_X + ((_Xspacing/5.6*-4)), (_Y+(_Width/5.6)*9), _Z ],[],0,"CAN_COLLIDE"]; _B1 setDir 270;
_B2 = createVehicle ["Land_Cargo_House_V1_F",[_X + ((_Xspacing/5.6*-4)), (_Y+(_Width/5.6)*4), _Z ],[],0,"CAN_COLLIDE"]; _B2 setDir 270;
_PJ = createVehicle ["Land_FieldToilet_F",[_X + ((_Xspacing/5.6)*5), (_Y+(_Width/5.6)*4.5), _Z ],[],0,"CAN_COLLIDE"]; _Pj setDir 180;
_PJ2 = createVehicle ["Land_FieldToilet_F",[_X + ((_Xspacing/5.6)*4.7), (_Y+(_Width/5.6)*4.5), _Z ],[],0,"CAN_COLLIDE"]; _Pj2 setDir 180;
_PJ3 = createVehicle ["Land_FieldToilet_F",[_X + ((_Xspacing/5.6)*4.4), (_Y+(_Width/5.6)*4.5), _Z ],[],0,"CAN_COLLIDE"]; _Pj3 setDir 180;
_Connex1 = createVehicle ["Land_Cargo20_grey_F",[_X + ((_Xspacing/5.6)*4.5), (_Y+(_Width/5.6)*-6), _Z ],[],0,"CAN_COLLIDE"];
_Connex2 = createVehicle ["Land_Cargo20_grey_F",[_X + ((_Xspacing/5.6)*4.5), (_Y+(_Width/5.6)*-4), _Z ],[],0,"CAN_COLLIDE"];
_FUEL1 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.3), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"];
_FUEL2 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.5), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"];
_FUEL3 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.7), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"];
_FUEL4 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.9), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"];
_FUEL5 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.3), (_Y+(_Width/5.6)*-7), _Z +1 ],[],0,"CAN_COLLIDE"];
_FUEL6 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.5), (_Y+(_Width/5.6)*-7), _Z +1 ],[],0,"CAN_COLLIDE"];
_FUEL7 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.7), (_Y+(_Width/5.6)*-7), _Z +1 ],[],0,"CAN_COLLIDE"];
_FUEL8 = createVehicle ["Land_MetalBarrel_F",[_X + ((_Xspacing/5.6)*4.9), (_Y+(_Width/5.6)*-7), _Z +1 ],[],0,"CAN_COLLIDE"];
_CAN1 = createVehicle ["Land_CanisterFuel_F",[_X + ((_Xspacing/5.6)*4.0), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"]; _CAN1 setDir 270;
_CAN2 = createVehicle ["Land_CanisterFuel_F",[_X + ((_Xspacing/5.6)*4.1), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"]; _CAN2 setDir 270;
_CAN2 = createVehicle ["Land_CanisterFuel_F",[_X + ((_Xspacing/5.6)*4.2), (_Y+(_Width/5.6)*-7), _Z ],[],0,"CAN_COLLIDE"]; _CAN2 setDir 270;
_Light1 = createVehicle ["Land_PortableLight_double_F",[_X + ((_Xspacing/5.6*-4)), (_Y+(_Width/5.6)*11), _Z ],[],0,"CAN_COLLIDE"]; _Light1 setDir 270;
_Light2 = createVehicle ["Land_PortableLight_double_F",[_X + ((_Xspacing/5.6*5)), (_Y+(_Width/5.6)*11), _Z ],[],0,"CAN_COLLIDE"]; _Light2 setDir 90;
_Light3 = createVehicle ["Land_PortableLight_double_F",[_X + ((_Xspacing/5.6*-4)), (_Y+(_Width/5.6)*-11), _Z ],[],0,"CAN_COLLIDE"]; _Light3 setDir 270;
_Light4 = createVehicle ["Land_PortableLight_double_F",[_X + ((_Xspacing/5.6*5)), (_Y+(_Width/5.6)*-11), _Z ],[],0,"CAN_COLLIDE"]; _Light4 setDir 90;
//------------------------Vehicles---------------------------------

_HELO = createVehicle [_GHOSTHAWK,[_X + (_Xspacing/10), (_Y+(_Width/5.6)*-10), _Z ],[],0,"CAN_COLLIDE"];
_VEH1 = createVehicle ["B_MRAP_01_Gmg_F",[_X + ((_Xspacing/10)*-2), (_Y+(_Width/5.6)*12), _Z ],[],0,"CAN_COLLIDE"]; _VEH1 setDir 180;
_VEH2 = createVehicle ["B_MRAP_01_Gmg_F",[_X + ((_Xspacing/10)*0), (_Y+(_Width/5.6)*12), _Z ],[],0,"CAN_COLLIDE"]; _VEH2 setDir 180;
_VEH3 = createVehicle ["B_MRAP_01_hmg_F",[_X + ((_Xspacing/10)*2), (_Y+(_Width/5.6)*12), _Z ],[],0,"CAN_COLLIDE"]; _VEH3 setDir 180;
_VEH4 = createVehicle ["B_MRAP_01_hmg_F",[_X + ((_Xspacing/10)*4), (_Y+(_Width/5.6)*12), _Z ],[],0,"CAN_COLLIDE"]; _VEH4 setDir 180;
_FUELER = createVehicle ["B_Truck_01_fuel_F",[_X + ((_Xspacing/5.6*-4)), (_Y+(_Width/5.6)*-8), _Z ],[],0,"CAN_COLLIDE"]; _FUELER setDir 90;
_REPAIR = createVehicle ["B_Truck_01_Repair_F",[_X + ((_Xspacing/5.6*-4)), (_Y+(_Width/5.6)*-4), _Z ],[],0,"CAN_COLLIDE"]; _REPAIR setDir 90;

//------------------------Towers---------------------------------
// Back Wall - or - East Wall
_T = createVehicle[_Tower ,[ _X + (_tLength - 6), _Y + (_Yspacing - 6), _Z],[],0,"CAN_COLLIDE"];
_T setDir 270;
sleep 0.1;
_T = createVehicle[_Tower ,[ _X + (_tLength - 6), _Y - (_Yspacing - 4), _Z],[],0,"CAN_COLLIDE"];
_T setDir 270;
// Front Wall - or - West Wall
_T = createVehicle[_Tower ,[ _X + (_Xstart + 5), _Y + (_Yspacing - 6), _Z],[],0,"CAN_COLLIDE"];
_T setDir 90;
sleep 0.1;
_T = createVehicle[_Tower ,[ _X + (_Xstart + 5), _Y - (_Yspacing - 4), _Z],[],0,"CAN_COLLIDE"];
_T setDir 90;



_wall = 0;
//------------------------Create-SideWalls-akaLength---------------------------------

_arrayWall = [];
for [{_i = 0},{_i < (_Length * 2)},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       if (_i < _Length) then // Left Wall
       {
           _wall = createVehicle [_HWALL,[_X + (_Xstart + (5.6 * _i)), _Y + _Yspacing, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       };
       if (_i >= _Length) then // Right Wall
       {
           _wall = createVehicle [_HWALL,[_X + (_Xstart + (5.6 * (_i - _Length))), _Y - _Yspacing, _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       };
       _arrayWall = _arrayWall + [_wall];
       sleep 0.05;
       if (_n > 1) then
       {
           _index = (_sideHeight * _i) + (_n - 1);
           _wall attachTo [(_arrayWall select _index), [0,0,1.2]];
       };
   };
};
//------------------------Create-BackWall-akaWidth------------------------------
_arrayWall = [];
for [{_i = 0},{_i < _Width},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       _wall = createVehicle [_HWALL,[_X + _Xspacing, ((_Y - _Ystart) + (5.6 * _i)), _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
       _wall setDir 270;
       _arrayWall = _arrayWall + [_wall];
       sleep 0.05;
       if (_n > 1) then
       {
           _index = (_sideHeight * _i) + (_n - 1);
           _wall attachTo [(_arrayWall select _index), [0,0,1.2]];
       };
   };
};
_arrayWall = 0;
//------------------------Create-FrontWall-akaWidth------------------------
_arrayWall = [];
for [{_i = 0},{_i < _Width},{_i =_i + 1}] do
{
   for [{_n = 0},{_n < _sideHeight},{_n =_n + 1}] do
   {
       if (_midSection != _i) then
       {
           _wall = createVehicle [_HWALL,[_X - (_Xspacing + 0.5), ((_Y - _Ystart) + (5.6 * _i)), _Z + (1.2 * _n)],[],0,"CAN_COLLIDE"];
           _wall setDir 270;
           _arrayWall = _arrayWall + [_wall];
           sleep 0.05;
           if (_n > 1) then
           {
               _index = (_sideHeight * _i) + (_n - 1);
               _wall attachTo [(_arrayWall select _index), [0,0,1.2]];
           };
       };
       if (_midSection == _i) then
       {
           // Todo, add the military sign
           // Add in some gates
           // Or make some other contraption?
       };
   };
};
_arrayWall = 0;  

};

Edited by rachio

Share this post


Link to post
Share on other sites

Will get around to checking out the 11x11 some time today. I've got some of the stuff working for rotating but need to rebuild the code that builds the walls to accommodate for it plus figure out some extra stuff that goes along with it.

Just looked at your code and see a problem with

_Width = round floor (_markSize select 1);
// ^ This variable was actually used to count the number of sections which is used
_Yspacing = (((_Width + 1) * 5.6) - 4) * 0.5;
// Orig
_Width = round floor ((_markSize select 1) / 5.6);

The variable's name is misleading and should be changed. I see your using the length and width of the marker for setting placement of the other objects so I'll just rename it to sectionCnt or similar.

Share this post


Link to post
Share on other sites

Ah, my bad. When I was to Tinkering with it I saw that if I removed that divisor, it went from being a 1/6 scale to spot on and kinda just stuck with that. Didnt know for sure if it was old code remnants or if it was intended. Also, I've only been able to do the one(11x11) concept layout. I just recent got switched from nights to days so I've been spending the last few days just adjusting to my new schedule and workload. I'll try to do several different size layouts when I'm able to get some free time, but that might take me a while.

Share this post


Link to post
Share on other sites

No rush. I just finally resolved my rotation issue, was something extremely simple that I missed, but still need to redo the height code and then clean up the code so it'll take me a bit as well.

edit

-- The code is not cleaned up yet but I need you to look at it how to reference the placement of the objects within the FOB. As it is now, the wall will rotate but the towers have not been coded to rotate properly yet but I'm burnt out on it for the day.

There's 4 corner markers that I've placed down that represent the corners of the FOB, these are the markers to do distance adjustments on. Or, you can do adjustments from the center coordinate as well. I tried to explain a bit better in the script too. I'll be continuing to re organize this script and perhaps add a few more functions to tidy everything up but didn't want to get too far into creating all of the templates with out first checking out how they need to be referenced now.

FOB-DownLoad

Also, I'm considering moving the object placement into another sqf file, since it'll make it cleaner and easier to modify the templates for the different sizes.

Edited by King_Richard

Share this post


Link to post
Share on other sites

I'm not going to lie, I'm not a very smart person, lol! I tried playing around with spawning the HQ, but couldn't figure it out despite the instructions left in the code. I even tried changing the Tower's code to see if it'd spawn the HQ but still spawns the towers despite it not being defined as such.


_cX = _mX + _sideXstart;
_cY = _mY - _sideYstart;
_dist_x = _cX - _mX;
_dist_y = _cY - _mY;
_distSide = sqrt ((_dist_x * _dist_x) + (_dist_y * _dist_y));
// [ xDimension, yDimension] offset from center

_offSet = call {[_angle, _distSide, _dist_x, _dist_y] call trig_RotatePtAroundPt};
_c4 = [_mX + (_offSet select 0), _mY + (_offSet select 1), _mZ];

_c_pts = [];
_c_pts = [_c0] + [_c1] + [_c2] + [_c3] + [_c4];
sleep 0.1;

**Skip in code**

_H = createVehicle[_Towerzz ,[ ((_c4 select 0) + 0), ((_c4 select 1) + 0), _mZ],[],0,"CAN_COLLIDE"];
_H setDir (90 + _angle);

Since this is basically all new to me and I'm inherently horrible at math, I apologize for being a little dense in deciphering it.

Also, question, I'm getting an error code saying that Mwidth is not defined on Line 72. Not sure exactly why that is since it's just a return value?

Share this post


Link to post
Share on other sites

_H = createVehicle[_Towerzz ,[ ((_c4 select 0) + 0), ((_c4 select 1) + 0), _mZ],[],0,"CAN_COLLIDE"];
// Should be - for HQ
_H = createVehicle[_HQ,[ ((_c4 select 0) + 0), ((_c4 select 1) + 0), _mZ],[],0,"CAN_COLLIDE"];

And Mwidth should be _wWidth

I'll work on putting the building locations into a separate file. Also, if it helps you can build the templates however your comfortable and I'll work on converting them into something that's scale-able afterwards.

Share this post


Link to post
Share on other sites

Well, this is also doubling as a learning process for me, lol! It'd be kinda pointless/rude if I just made you do all the work without me being able to contribute in some shape or form. Also, I don't know why that "_Towerzz" line was there, I think I might have hit CTRL +Z to many times and ended up erasing "_HQ" from that spot. I have tried redoing by copy-pasta'n the code above and it's still a no-go. I did however encounter a section of wall creation instead of the actual building for some reason

despite it being defined as HQ? I guess that could be a sign of progress, maybe? Here's what I interpret from the script.

  • Definitions script defines basic items and functions for use in main script.

  • First section of the main script defines/gets marker's variables(I.G. size, altitude, azimuth) and calls one of the pre-made functions.

  • The section counts gets the radius or diameter of the entire FOB(?) and puts it to some form of scaling ratio. (Where as I was mistakenly removing the divisors to make it a 1:1 ratio breaking some of the math?)

  • The wall calculations get the distances from 0 to the respected corner points.

  • The creation formulas build from the previously defined corner points

  • The wall array duplicates the creation line along a defined path.

That's what I'm understanding so far... I'm most likely missing the basic principles of the code and that's probably why I'm falling short on adding in my parts to help out.

For the insane math you've been doing, I've been doing some research on trig (I never got past the first module of Geo and was forced to take finance classes as my school system was horrid) to see what you have been up against. I'm assuming you're using polar to Cartesian coordinates(?) and making each variable for the creation based on those coordinates?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×