jjespejo 10 Posted February 1, 2011 Just wanted to share a working version of COIN Base Construction. Pulled various user inputs but big thanks to Moach Mayham. Create a file called coinvar.sqf copy past the code below and follow instructions in // sections to make it work. Place file in Game folder. FYI, could not get Item 8&9 to work, not sure why?? //credit to Moach Mayhem for code and layout. I added line descriptions and items to make //basic Base Construction and allow other to build more into this. //Place Construction Interface(COIN) Module on Map. In its init //put _naught = [this, player] execVM "coinvars.sqf" //then synchronize each player to the COIN module placed on map fieldSupplies = 5000; //set to 0 and make cost below 0 for all free _builder = _this select 1; //player _module = _this select 0; //this _module setVariable ["BIS_COIN_name", "F.O.B Construction"]; _module setVariable ["BIS_COIN_funds", "fieldSupplies"]; _module setVariable ["BIS_COIN_fundsdescription", "*"]; // you can use any symbol $, Euro // your list of categories you want player to see _module setVariable ["BIS_COIN_categories", ["Base Assets","Barriers","Light Vehicles", "Armour","Static Weapons"]]; _module setVariable ["BIS_COIN_areaSize", [100, 50]]; //distance radius around construction zone _gearArray = []; //Base Assets //"CLASS","Categories","Cost","Your Desciption" ** Cost 0 = free _gearArray set [0, ["USMC_WarfareBBarracks","Base Assets",100,"Barracks"]]; _gearArray set [1, ["Land_fortified_nest_big","Base Assets",75,"Fortified Nest"]]; _gearArray set [2, ["Land_Fortified_nest_small","Base Assets",50,"Sandbag Nest"]]; _gearArray set [3, ["MASH","Base Assets",100,"Mash Tent"]]; _gearArray set [4, ["USMC_WarfareBMGNest_M240","Base Assets",150,"MG Nest"]]; //Barriers _gearArray set [5, ["Land_Fort_Watchtower","Barriers",200,"Fort Tower"]]; _gearArray set [6, ["Hhedgehog_concrete","Barriers",30,"Concrete Tank Barriers"]]; _gearArray set [7, ["Land_fort_bagfence_round","Barriers",10,"Sandbag Circle"]]; _gearArray set [8, ["smallbase","Barriers",500,"Small Compound"]]; //doesn't work _gearArray set [9, ["tankDitch2_cdf","Barriers",500,"Tank Compound"]]; //doesn't work //Armour _gearArray set [10, ["M1A2_Tusk_MG","Armour",500,"M1A2 Tusk"]]; _gearArray set [11, ["MLRS","Armour",300,"MLRS Rocket Tank"]]; _gearArray set [12, ["M6_EP1","Armour",400,"M6 Tank"]]; _gearArray set [13, ["M2A3_EP1","Armour",400,"M2A3 TOW"]]; //Light Vehicles _gearArray set [14, ["LAV25","Light Vehicles",150,"LAV25"]]; _gearArray set [15, ["M1126_ICV_M2_EP1","Light Vehicles",125,"Stryker M2"]]; _gearArray set [16, ["HMMWV_M2","Light Vehicles",110,"HMMWV M2"]]; _gearArray set [17, ["HMMWV_MK19","Light Vehicles",100,"HMMWV MK19"]]; //Static Weapons _gearArray set [18, ["M119","Static Weapons",400,"M119 Canon"]]; _gearArray set [19, ["MK19_Tripod","Static Weapons",125,"MK19 Grenade Gun"]]; _gearArray set [20, ["2b14_82mm","Static Weapons",110,"82mm Mortors"]]; _module setVariable ["BIS_COIN_items", _gearArray]; Share this post Link to post Share on other sites
JakeWed 10 Posted February 2, 2011 I dont know about the COIN Thing, but maybe its because theres Object Compositions? Share this post Link to post Share on other sites
daimyo21 2 Posted April 1, 2011 (edited) I modified it and placed a KORD machine gun and I can only disassemble it but not use it... Any help? Also if I reassemble i still cant get in it. EDIT* OK so heres the problem.. Im group leader and i have construction synced too me. I build static and great.. I can use. But my teammates cant use... I killed leader and the next promoted guy could use the gun but unless your leader u cant use Actually the condition is _naught = [this, player] or whatever, but thats just to use the construction menu.. not the objects.. even when I place objects on ground too via editor I cant use them as teammates.. wth.. Edited April 1, 2011 by Daimyo21 Share this post Link to post Share on other sites
Baraka 10 Posted May 8, 2011 Sorry for digging this out, wan´t start a new threat for my little question. The script works really fine! Easy to use for a script-noob like me! Can i use the COIN with other objects than this in the list? _gearArray set [0, ["USMC_WarfareBBarracks","Base Assets",100,"Barracks"]]; _gearArray set [1, ["Land_fortified_nest_big","Base Assets",75,"Fortified Nest"]]; _gearArray set [2, ["Land_Fortified_nest_small","Base Assets",50,"Sandbag Nest"]]; _gearArray set [3, ["MASH","Base Assets",100,"Mash Tent"]]; _gearArray set [4, ["USMC_WarfareBMGNest_M240","Base Assets",150,"MG Nest"]]; //Barriers _gearArray set [5, ["Land_Fort_Watchtower","Barriers",200,"Fort Tower"]]; _gearArray set [6, ["Hhedgehog_concrete","Barriers",30,"Concrete Tank Barriers"]]; _gearArray set [7, ["Land_fort_bagfence_round","Barriers",10,"Sandbag Circle"]]; _gearArray set [8, ["smallbase","Barriers",500,"Small Compound"]]; //doesn't work _gearArray set [9, ["tankDitch2_cdf","Barriers",500,"Tank Compound"]]; //doesn't work //Armour _gearArray set [10, ["M1A2_Tusk_MG","Armour",500,"M1A2 Tusk"]]; _gearArray set [11, ["MLRS","Armour",300,"MLRS Rocket Tank"]]; _gearArray set [12, ["M6_EP1","Armour",400,"M6 Tank"]]; _gearArray set [13, ["M2A3_EP1","Armour",400,"M2A3 TOW"]]; //Light Vehicles _gearArray set [14, ["LAV25","Light Vehicles",150,"LAV25"]]; _gearArray set [15, ["M1126_ICV_M2_EP1","Light Vehicles",125,"Stryker M2"]]; _gearArray set [16, ["HMMWV_M2","Light Vehicles",110,"HMMWV M2"]]; _gearArray set [17, ["HMMWV_MK19","Light Vehicles",100,"HMMWV MK19"]]; //Static Weapons _gearArray set [18, ["M119","Static Weapons",400,"M119 Canon"]]; _gearArray set [19, ["MK19_Tripod","Static Weapons",125,"MK19 Grenade Gun"]]; _gearArray set [20, ["2b14_82mm","Static Weapons",110,"82mm Mortors"]]; I tried it with some Objects from an Addon and they won´t appear. My Guess is that the listed Objects have a own config where the green Symbol and other stuff are arranged. But the Hope dies last. Maybe there is another solution to place objects while an MP-Game. I need only static Objects, no weapons,no vehicles. Thanks for reading this! Baraka Share this post Link to post Share on other sites
0c370t 10 Posted November 28, 2013 Hello, I started on your base and though I'd post this for users who want more starting content. *Use the instructions from above to make this work* Playerfunds = 50000; _builder = _this select 1; _module = _this select 0; _module setVariable ["BIS_COIN_name", "Desert Fortificationress"]; _module setVariable ["BIS_COIN_funds", "Playerfunds"]; _module setVariable ["BIS_COIN_fundsdescription", "$"]; _module setVariable ["BIS_COIN_categories", ["Fortification","Bunkers","Ammo Boxes","Static Weapons","Camo","Flags"]]; _module setVariable ["BIS_COIN_areaSize", [100, 100]]; _module setvariable ["BIS_COIN_items", [ //--- Class, Category, Cost or [fundsID,Cost], (display name) ["Fort_RazorWire","Fortification",10,"Wire"], ["Fort_Barricade","Fortification",15,"Pile of Junk"], ["Fort_EnvelopeBig_EP1","Fortification",5,"Big Dirt"], ["Fort_EnvelopeSmall_EP1","Fortification",5,"Little Dirt"], ["Hhedgehog_concreteBig","Fortification",10,"Concrete Tank Trap"], ["Hedgehog","Fortification",5,"Tank Trap"], ["Land_Fort_bagfence_long","Fortification",20,"Long Sandbag Fence"], ["Land_Fort_bagfence_round","Fortification",15,"Round Sandbag Fence"], ["Land_Fort_bagfence_corner","Fortification",20,"Corner Sandbag Fence"], ["Land_Fort_artillery_nest_EP1","Fortification",20,"Earthen Artillery Nest"], ["Land_Fort_rampart_EP1","Fortification",10,"Earthen Rampart"], ["Land_HBarrier_large","Fortification",25,"H-Barrier Large"], ["Land_HBarrier1","Fortification",5,"H-Barrier 1"], ["Land_HBarrier3","Fortification",15,"H-Barrier 3"], ["Land_HBarrier5","Fortification",25,"H-Barrier 5"], ["Base_WarfareBBarrier5x","Fortification",25,"Short Wall"], ["Base_WarfareBBarrier10x","Fortification",40,"Long Wall"], ["Base_WarfareBBarrier10xTall","Fortification",75,"Long Tall Wall"], ["Land_Fortified_nest_small_EP1","Bunkers",50,"Small Bunker"], ["Land_Fort_Watchtower_EP1","Bunkers",100,"Bunker Tower"], ["Land_Fortified_nest_big_EP1","Bunkers",200,"Large Bunker"], ["USBasicAmmunitionBox","Ammo Boxes",250,"US Basic Ammo"], ["USBasicWeaponsBox","Ammo Boxes",250,"US Basic Weapons"], ["USLaunchersBox","Ammo Boxes",500,"US Launchers"], ["USOrdnanceBox","Ammo Boxes",500,"US Ordnance"], ["USSpecialWeaponsBox","Ammo Boxes",750,"US Special Weapons"], ["UNBasicAmmunitionBox_EP1","Ammo Boxes",250,"UN Basic Ammo"], ["UNBasicWeapons_EP1","Ammo Boxes",250,"UN Basic Weapons"], ["Gunrack1","Ammo Boxes",0,"Gun Rack"], ["SpecialWeaponsBox","Ammo Boxes",750,"PMC Special Weapons"], ["Land_CamoNet_NATO_EP1","Camo",50,"NATO Camo Net 1"], ["Land_CamoNetb_NATO_EP1","Camo",50,"NATO Camo Net 2"], ["Land_CamoNetvar_NATO_EP1","Camo",50,"NATO Camo Net 3"], ["M2HD_mini_TriPod_US_EP1","Static Weapons",500,"M2 MiniTripod"], ["M2StaticMG_US_EP1","Static Weapons",750,"M2 Tripod"], ["MK19_TriPod_US_EP1","Static Weapons",750,"Mk19 MiniTripod"], ["TOW_TriPod_US_EP1","Static Weapons",1000,"TOW Tripod"], ["Stinger_Pod_US_EP1","Static Weapons",1000,"AA Launcher"], ["M252_US_EP1","Static Weapons",1500,"M252 Mortar"], ["M119_US_EP1","Static Weapons",2000,"M119 Artillery/AT Cannon"], ["FlagCarrierBLUFOR_EP1","Flags",0,"Blufor Flag"], ["FlagCarrierNATO_EP1","Flags",0,"NATO Flag"], ["FlagCarrierRedCross_EP1","Flags",0,"Red Cross Flag"], ["FlagCarrierUSA_EP1","Flags",0,"United States Flag"], ["FlagCarrierUSArmy_EP1","Flags",0,"United States Army Flag"] ] ]; Share this post Link to post Share on other sites
GhostProGamer 10 Posted October 4, 2014 Hi i need some help with this when i try to put the code in a gamefolder i dont see it so i just put the code in a text document in put it in the main page of ArmA 2 OA folder. When im in game editor i put the construction interface modules and syncronize it to my player but when i go into the constuction menu i have no category's of base or defense.please help and i have no idea what these means //put _naught = [this, player] execVM "coinvars.sqf" and thanks Share this post Link to post Share on other sites
Mirek 166 Posted October 8, 2014 You are making a mission right? So you have saved the mission in the editor right? So go to Documents/Arma2/Missions or to Documents/Arma2OtherProfiles/yourprofilename/missions (or MPmissions) -Locate File that has the same name as your mission. In that file should be a file called mission.sqm. -Now you add new file that will be called coinvars.sqf. -Now you have two files in that folder: Mission.sqm and coinvars.sqf. -Open coinvars.sqf and put the code from OP to that file.¨ -save the file.¨ -go back to Arma 2 editor to your mission. -From modules menu choose Construction Interface, and place it on map. -in construction interface´s init field place the _naught = [this, player] execVM "coinvars.sqf" maybe try naught instead of _naught. not sure. -Sinchronise the placed module with each playable unit placed on map. -Do not change anything in the code, untill you are sure that it works. Share this post Link to post Share on other sites