RJ Wattenhofer

Tech writing, 3D model building and game design.

April 30, 2017

ArmA 2 | How to Use the Construction Interface

Giving your players the ability to shop for and buy field supplies

arma 2 operation arrowhead logo

Setting up the Construction Interface (COIN) is a three step process. First, you will need to open up your text editor and paste the following code into it:

fieldSupplies = 99999; //set to 0 = free

_builder = _this select 1; //player
_module = _this select 0;  //this

_module setVariable ["BIS_COIN_name", "Supply Menu"];
_module setVariable ["BIS_COIN_funds", "fieldSupplies"];
_module setVariable ["BIS_COIN_fundsdescription", "$"]; 
                                             // CATEGORIES
_module setVariable ["BIS_COIN_categories", ["Personnel","Ammo Boxes","Weapon Boxes","Static Weapons","Fortifications","Warfare Buildings","Armour","Light Vehicles","Various Transport","Support"]];
_module setVariable ["BIS_COIN_areaSize", [100, 50]]; //radius around construction site

_gearArray = [];

_gearArray set [0, ["US_Soldier_SniperH_EP1","Personnel",100,"Sniper"]];
_gearArray set [1, ["US_Soldier_Pilot_EP1","Personnel",100,"Pilot"]];
_gearArray set [2, ["US_Soldier_Officer_EP1","Personnel",100,"Officer"]];
_gearArray set [3, ["US_Soldier_Medic_EP1","Personnel",100,"Medic"]];
_gearArray set [4, ["US_Soldier_Marksman_EP1","Personnel",100,"Marksman"]];
_gearArray set [5, ["US_Soldier_MG_EP1","Personnel",100,"Machinegunner"]];
_gearArray set [6, ["US_Soldier_Engineer_EP1","Personnel",100,"Engineer"]];
_gearArray set [7, ["US_Soldier_HAT_EP1","Personnel",100,"Specialist"]];
_gearArray set [8, ["US_Delta_Force_AR_EP1","Personnel",100,"Automatic Rifleman"]];

//Ammo Boxes
_gearArray set [9, ["BAF_BasicAmmunitionBox","Ammo Boxes",50,"BAF"]];
_gearArray set [10, ["USBasicAmmunitionBox","Ammo Boxes",50,"USMC"]];
_gearArray set [11, ["USBasicAmmunitionBox_EP1","Ammo Boxes",50,"US"]];
_gearArray set [12, ["USOrdnanceBox_EP1","Ammo Boxes",50,"Ordnance Box"]];

//Weapon Boxes
_gearArray set [13, ["USVehicleBox_EP1","Weapon Boxes",50,"Items Box"]];
_gearArray set [14, ["USBasicWeapons_EP1","Weapon Boxes",50,"US"]];
_gearArray set [15, ["USBasicWeaponsBox","Weapon Boxes",50,"USMC"]];
_gearArray set [16, ["GERBasicWeapons_EP1","Weapon Boxes",50,"GER"]];
_gearArray set [17, ["BAF_BasicWeapons","Weapon Boxes",50,"BAF"]];
_gearArray set [18, ["USSpecialWeapons_EP1","Weapon Boxes",50,"Special Weapon US"]];
_gearArray set [19, ["USSpecialWeaponsBox","Weapon Boxes",50,"Special Weapon USMC"]];
_gearArray set [20, ["USLaunchers_EP1","Weapon Boxes",50,"Launchers US"]];
_gearArray set [21, ["USLaunchersBox","Weapon Boxes",50,"Launchers USMC"]];
_gearArray set [22, ["BAF_Launchers","Weapon Boxes",50,"Launchers BAF"]];

//Static Weapons
_gearArray set [23, ["SearchLight","Static Weapons",100,"Searchlight"]];
_gearArray set [24, ["M119","Static Weapons",100,"M119 Artillery"]];
_gearArray set [25, ["M2HD_mini_TriPod","Static Weapons",100,"M2HD Mini Tripod"]];
_gearArray set [26, ["M2StaticMG","Static Weapons",100,"M2 Static MG"]];
_gearArray set [27, ["MK19_TriPod","Static Weapons",100,"MK19 Grenade Gun"]];
_gearArray set [28, ["Stinger_Pod","Static Weapons",100,"Stinger Pod"]];
_gearArray set [29, ["TOW_TriPod","Static Weapons",100,"TOW Tripod"]];
_gearArray set [30, ["2b14_82mm","Static Weapons",100,"82mm Mortors"]];
_gearArray set [31, ["M252_US_EP1","Static Weapons",100,"82mm Mortars"]];

_gearArray set [32, ["Land_fort_bagfence_round","Fortifications",100,"Sandbag Circle"]];
_gearArray set [33, ["Fort_RazorWire","Fortifications",100,"Razor Wire"]]; 
_gearArray set [34, ["Hedgehog","Fortifications",100,"Hedgehog"]];
_gearArray set [35, ["Hhedgehog_concrete","Fortifications",100,"Concrete Hedgehog"]];
_gearArray set [36, ["Hhedgehog_concreteBig","Fortifications",100,"BigConcrete Hedgehog"]];
_gearArray set [37, ["Fort_Barricade","Fortifications",100,"Fort Barricade"]];
_gearArray set [38, ["Land_BagFenceCorner","Fortifications",100,"Bag Fence Corner"]];
_gearArray set [39, ["Land_BagFenceEnd","Fortifications",100,"Bag Fence End"]];
_gearArray set [40, ["Land_BagFenceShort","Fortifications",100,"Bag Fence Short"]];
_gearArray set [41, ["Land_BagFenceLong","Fortifications",100,"Bag Fence Long"]];
_gearArray set [42, ["Land_BagFenceRound","Fortifications",100,"Bag Fence Round"]];
_gearArray set [43, ["Land_fort_bagfence_long","Fortifications",100,"Land Fort bagfence Long"]];
_gearArray set [44, ["Land_fort_bagfence_corner","Fortifications",100,"Land Fort bagfence Corner"]];
_gearArray set [45, ["Land_fort_bagfence_round","Fortifications",100,"Land Fort bagfence Round"]];
_gearArray set [46, ["Land_HBarrier1","Fortifications",100,"Land HBarrier 01"]];
_gearArray set [47, ["Land_HBarrier3","Fortifications",100,"Land HBarrier 03"]];
_gearArray set [48, ["Land_HBarrier5","Fortifications",100,"Land HBarrier 05"]];
_gearArray set [49, ["Land_HBarrier_large","Fortifications",100,"Land HBarrier Large"]];
_gearArray set [50, ["Land_fortified_nest_big","Fortifications",100,"Fortified Nest"]];
_gearArray set [51, ["Land_Fortified_nest_small","Fortifications",100,"Sandbag Nest"]];
_gearArray set [52, ["Land_Fort_Watchtower","Fortifications",100,"Fort Tower"]];
_gearArray set [53, ["Fort_EnvelopeSmall","Fortifications",100,"Fort Envelope Small"]];
_gearArray set [54, ["Fort_EnvelopeBig","Fortifications",100,"Fort Envelope Big"]];
_gearArray set [55, ["Land_fort_rampart","Fortifications",100,"Land Fort Rampart"]];
_gearArray set [56, ["Land_fort_artillery_nest","Fortifications",100,"Land Fort Artillery Nest"]];
_gearArray set [57, ["Land_fort_artillery_nest","Fortifications",100,"Fort_Nest_M240"]];
//Warfare Buildings
_gearArray set [58, ["LAV25_HQ_unfolded","Warfare Buildings",1000,"HQ"]];
_gearArray set [59, ["USMC_WarfareBBarracks","Warfare Buildings",1000,"Barracks"]];
_gearArray set [60, ["USMC_WarfareBMGNest_M240","Warfare Buildings",1000,"MG Nest"]];
_gearArray set [61, ["MASH","Warfare Buildings",1000,"Mash Tent"]];
_gearArray set [62, ["USMC_WarfareBFieldhHospital","Warfare Buildings",1000,"Field Hospital"]];
_gearArray set [63, ["USMC_WarfareBAntiAirRadar","Warfare Buildings",1000,"Anti-Air Radar"]];
_gearArray set [64, ["USMC_WarfareBArtilleryRadar","Warfare Buildings",1000,"Artillery Radar"]];
_gearArray set [65, ["USMC_WarfareBLightFactory","Warfare Buildings",1000,"Light Factory"]];
_gearArray set [66, ["USMC_WarfareBHeavyFactory","Warfare Buildings",1000,"Heavy Factory"]];
_gearArray set [67, ["USMC_WarfareBAircraftFactory","Warfare Buildings",1000,"Aircraft Factory"]];
_gearArray set [68, ["USMC_WarfareBUAVterminal","Warfare Buildings",1000,"UAV Terminal"]];
_gearArray set [69, ["USMC_WarfareBVehicleServicePoint","Warfare Buildings",1000,"Aircraft Factory"]];
_gearArray set [70, ["USMC_WarfareBContructionSite","Warfare Buildings",1000,"Construction Site 00"]];
_gearArray set [71, ["USMC_WarfareBContructionSite1","Warfare Buildings",1000,"Construction Site 01"]];

_gearArray set [72, ["M1A1_US_DES_EP1","Armour",1000,"M1A1"]];
_gearArray set [73, ["M1A2_US_TUSK_MG_EP1","Armour",1000,"M1A2 TUSK"]];
_gearArray set [74, ["BAF_FV510_D","Armour",1000,"FV510 Warrior"]];
_gearArray set [75, ["M2A2_EP1","Armour",1000,"M2A2 Bradley IFV"]];

//Light Vehicles
_gearArray set [76, ["HMMWV_M1151_M2_DES_EP1","Light Vehicles",1000,"HMMWV GPK (M2)"]];
_gearArray set [77, ["HMMWV_Avenger_DES_EP1","Light Vehicles",1000,"HMMWV Avenger"]];
_gearArray set [78, ["HMMWV_TOW_DES_EP1","Light Vehicles",1000,"HMMWV (TOW)"]];
_gearArray set [79, ["HMMWV_MK19_DES_EP1","Light Vehicles",1000,"HMMWV (Mk19)"]];

//Various Transport
_gearArray set [80, ["MH6J_EP1","Various Transport",1000,"MH6J Helicopter"]];
_gearArray set [81, ["UH1Y","Various Transport",1000,"UH1Y Venom Helicopter"]];
_gearArray set [82, ["AH6J_EP1","Various Transport",1000,"AH6J Helicopter"]];
_gearArray set [83, ["AW159_Lynx_BAF","Various Transport",1000,"AH-11 Wildcat"]];
_gearArray set [84, ["UH60M_EP1","Various Transport",1000,"UH60M Helicopter"]];
_gearArray set [85, ["MH60S","Various Transport",1000,"MH60S Helicopter"]];
_gearArray set [86, ["CH_47F_EP1","Various Transport",1000,"CH 47F Helicopter"]];
_gearArray set [87, ["AH1Z","Various Transport",1000,"AH1Z Helicopter"]];
_gearArray set [88, ["AH64D_EP1","Various Transport",1000,"AH64D Helicopter"]];
_gearArray set [89, ["C130J_US_EP1","Various Transport",1000,"C-130J Airplane"]];
_gearArray set [90, ["A10_US_EP1","Various Transport",1000,"A 10 Airplane"]];
_gearArray set [91, ["AV8B","Various Transport",1000,"Airplane"]];
_gearArray set [92, ["Zodiac","Various Transport",1000,"CRRC Boat"]];
_gearArray set [93, ["RHIB","Various Transport",1000,"RHIB Boat"]];
_gearArray set [94, ["RHIB2Turret","Various Transport",1000,"RHIB MK 19 Boat"]];
_gearArray set [95, ["ATV_US_EP1","Various Transport",1000,"ATV"]];
_gearArray set [96, ["M1030_US_DES_EP1","Various Transport",1000,"Motorcycle"]];
_gearArray set [97, ["ArmoredSUV_PMC","Various Transport",1000,"Armored SUV"]];

_gearArray set [98, ["HMMWV_Ambulance_DES_EP1","Support",1000,"HMMWV Ambulance"]];
_gearArray set [99, ["MtvrReammo","Support",1000,"Mtvr Reammo"]];
_gearArray set [100, ["MtvrRefuel","Support",1000,"Mtvr Refuel"]];
_gearArray set [101, ["MtvrRepair","Support",1000,"Mtvr Repair"]];
_gearArray set [102, ["M1133_MEV_EP1","Support",1000,"M1133 MEV"]];
_gearArray set [103, ["UH60M_MEV_EP1","Support",1000,"UH60M MEV"]];

_module setVariable ["BIS_COIN_items", _gearArray];

This is your inventory list and can be modified as you see fit. You can get item codes from such places as the ArmA 2 OA: Vehicles page, the ArmA 2: Weapons page and the ArmA 2:OA and DLC Weapons page.

Save this file as construction.sqf and drop it into your mission folder.

Launch ArmA 2 and go into the editor. Open your mission and click on the 'Modules' button located on the right sidebar. Select 'Construction Interface' from the dropdown. In the module's 'Initialization' field enter this code:

_naught = [this, player] execVM "construction.sqf"

Click 'OK'. You will now have a blue outlined box with a hammer in it. Click the 'Synchronize' button, click the module, hold down the mouse button, drag over to the first player and release. You will see a blue line connecting the module to the player. Do this to each player/playable unit.

arma 2 construction interface 01
arma 2 construction interface 02

Click the 'Preview' button and enter the mission. Scroll your mouse button and you will see a new item added to the green list on the left side titled 'Construction - Construction Menu'. Click it and you will be given a list of categories:

Ammo Boxes
Weapon Boxes
Static Weapons
Warfare Buildings
Light Vehicles
Various Transport

Clicking on a category will open up the individual items. You will then have the ability to place the items and the cost will be deducted from the group fund.

arma 2 construction interface 03
arma 2 construction interface 04

Related article: Adding Mission Tasks [ArmA 2]
Related article: Creating a Mission Intro Splash Screen [ArmA 2]
Related article: Creating Multiplayer Missions [ArmA 2]
Related article: General assembly: ArmA 2 VPN Setup [ArmA 2]
Related article: Spawning Soldiers with Timers [ArmA 2]
Related article: Implement Looping Waypoints [ArmA 2]
Related article: Code Design Potpourri [ArmA 2]

written by

bikini atoll 1946 cylidrome arena smart trivia game Cheap Silkroad R Sale Online, Fast And Safe, 24*7 online statis game statis game 02 country tales country tales 02 verdun game verdun game 02 ninja slayer action figure ninja slayer action figure
  • xing social button
  • linkedin social button
  • buffer social button
  • reddit social button
  • stumbleupon social button
  • facebook social button
  • google plus button
  • twitter social button
  • renren social button Renren
  • vkontakte social button Share in VK