Jump to content
Sign in to follow this  
pogoman979

Construction interface problem

Recommended Posts

How to enable "Buy units" and "Buy weapons" commands?

Construction Interface Module can only build bases and barracks,

but no commands appears near these buildings.

Share this post


Link to post
Share on other sites

EDIT: OK I solved the intial issues...whew these scripts are unforgiving!

OK the things the newer people need to know are as follows:

First of all, I created a init.sqf script, which as I understand, loads automatically so I don't need to do much in the editor.

So in init.sqf I entered the following:

myMoney = 1000;

MyCoin setvariable ["BIS_COIN_name","Base"];

MyCoin setvariable ["BIS_COIN_rules",[player]];

MyCoin setvariable ["BIS_COIN_areasize",[50,20]]; 

MyCoin setvariable ["BIS_COIN_categories",["Base", "Defence"]]; 

MyCoin setvariable ["BIS_COIN_items",
[
	//--- Class, Category, Cost or [fundsID,Cost], (display name)
	["USMC_WarfareBBarracks","Base",200,"Barracks"],
	["BTR90_HQ_unfolded","Base",100],
	["USMC_WarfareBLightFactory","Base",400],
	["USMC_WarfareBHeavyFactory","Base",600]
]
];

myCoin setvariable ["BIS_COIN_funds",["myMoney"]];

myCoin setvariable ["BIS_COIN_fundsDescription",["€"]];

MyCoin setvariable ["BIS_COIN_onPurchase",{sleep 2}]; 

Then you go to the editor. Now, you no longer need to synchronize the Construction module to the player because BIS_COIN_rules in the top code already does that, but YOU DO need to NAME the module MyCoin as referred to in the script, otherwise the script won't work.

That's it.

Now I have the same question as Evolve - how do I actually buy new units? I'm taking an educated guess that it has something to do with the warfare module - that module currently just hangs up my system when I try to load it and I have no idea what to do with it anyway. All I want is the ability to buy units. Anyone?

Update on the question: how do I tie my kills or succesful side quest completion to BIS_COIN_funds or myMoney account?

Edited by Jedo

Share this post


Link to post
Share on other sites

Thanks Jedo, that basic format has been very helpful!

But, can you assign a unique ID/name to any of the created buildings? How do you do that?

Oh, and is there a way to limit each Construction Module to allow only one (or set #) of each type of building?

Edited by Impavido

Share this post


Link to post
Share on other sites

Another question for you guys: how would I make the construction area be around the soldier, wherever he goes instead of where the module is placed?

Share this post


Link to post
Share on other sites

brief and quick question - how do i create or fill in optional parameters for modules in an editor map. for example how do i set the optional parameters for the construction module? How do i create the file for this and how to use it within the editor? i can't find any links explaining this, but i see people sharing information on changing the parameters, but no information to actually create one. One more question, how do i access the 3D editor, not the 2D editor.

e.g. editing and creating this kind of stuff for constructing bases....but how do you create this? and put it in game

http://community.bistudio.com/wiki/C...nal_parameters

Share this post


Link to post
Share on other sites

can someone please dumb this down for me i am not a computer wise guy i don't have a clue where to put this and i don't have a clue on what a init means please and thank you

Share this post


Link to post
Share on other sites

has anyone figured out how to add buyable units to the base buildings yet?

Share this post


Link to post
Share on other sites

And I would also like to support previous folks and ask: How do we increase the funds for a player who killed a unit (infantry, armor, etc.)?

Share this post


Link to post
Share on other sites

Could someone show an example of how to get this working, I entered that into my init.sqf but couldnt figure it out.

Share this post


Link to post
Share on other sites

I want to make a static machine gun using this, whenever I build it, it's not accesible. What am I doing wrong?

Edited by PorkyJack

Share this post


Link to post
Share on other sites

Yeah, how do I add items to the construction module so that I can have people build static defences?

Ohyeah also an interesting "bug"... If I attach the coIn to a humvee, then shoot the driver in the head, the guy with the mg on top rotates it through 90 degrees in the wrong direction, gets out, runs round the vehicle before running into the side of it and dying.

Share this post


Link to post
Share on other sites
using the contruction module i have gotten to the stage where i can place buildings like you would in warfare, however placing a building doesnt deduct from your funds, even though i set its cost in the BIS_COIN_items variable. none of the other commands listed here help:

http://community.bistudio.com/wiki/Construction_Interface

anyone know of anyother commands or what i'm doing wrong. i have set my construction vars like so:

_coin = _this select 0; (BIS_coin_0)

_coin setvariable ["BIS_COIN_categories",["Base", "Defence"]]; 

_coin setvariable ["BIS_COIN_items",
[
	//--- Class, Category, Cost or [fundsID,Cost], (display name)
	["USMC_WarfareBBarracks","Base",200],
	["BTR90_HQ_unfolded","Base",100],
	["USMC_WarfareBLightFactory","Base",200]
]
];

_coin setvariable ["BIS_COIN_areasize",[50,20]]; 

_coin setvariable ["BIS_COIN_funds",["200"]];

_coin setvariable ["BIS_COIN_fundsDescription",["S"]];

hi pogoman . im a bit lost with this ive created my sqf file, but now im not sure after reading this what im supposed to put in it anymore. can you give me a run down of what youve done so far or a demo mission? please help arrrgghh!!

Share this post


Link to post
Share on other sites

wow none of this seems to be working for me... and whoever writes up the wiki page for this could do much better.

Share this post


Link to post
Share on other sites

Hi Dose anyone know where i can find a list of items that i can add to the list of items for purchase and is it as simple as adding them on to the bottom of the list in the init.sqf

Example:

myMoney = 1000;

MyCoin setvariable ["BIS_COIN_name","Base"];

MyCoin setvariable ["BIS_COIN_rules",[player]];

MyCoin setvariable ["BIS_COIN_areasize",[50,20]]; 

MyCoin setvariable ["BIS_COIN_categories",["Base", "Defence"]]; 

MyCoin setvariable ["BIS_COIN_items",
[
	//--- Class, Category, Cost or [fundsID,Cost], (display name)
	["USMC_WarfareBBarracks","Base",200,"Barracks"],
	["BTR90_HQ_unfolded","Base",100],
	["USMC_WarfareBLightFactory","Base",400],
	["USMC_WarfareBHeavyFactory","Base",600],
               ["USMC_WarfareBFieldhHospital",Base",400,"Field Hospital"],
               ["USMC_WarfareBMGNest_M240",Assault,150"MG Nest (M240)"],
               ["USMC_WarfareBVehicleServicePoint",Base,1000"Vehicle Service Point"]
]
];

myCoin setvariable ["BIS_COIN_funds",["myMoney"]];

myCoin setvariable ["BIS_COIN_fundsDescription",["€"]];

MyCoin setvariable ["BIS_COIN_onPurchase",{sleep 2}];

I am taking the class names out of the ArmA2 Libary PDF but i have not had much sucess at getting anything else to show up in the build menu.

Share this post


Link to post
Share on other sites

how to create COIN by a script?

and what do I need to script after that? syncronization to a human-owner? or something else?

Share this post


Link to post
Share on other sites

creating COIN in Editor and

[i][color="SeaGreen"]Name_of_my_COIN_Module[/color][/i] synchronizeObjectsAdd [[i][color="SeaGreen"]Player_Name[/color][/i]];

doesn't help :( (but, manual syncronization works)

Edited by McArcher

Share this post


Link to post
Share on other sites

omg, it was so easy... (without any settings for COIN, just empty working COIN)... if someone else is looking for it, it can be done this way... (just an example)

Side_RU_MHQ = createCenter east;
group_RU_MHQ = createGroup east;
"ConstructionManager" createUnit [ getPos RU_MHQ, group_RU_MHQ, "COIN_RU_MHQ = this;"];
COIN_RU_MHQ synchronizeObjectsAdd [RU_player_1];

Share this post


Link to post
Share on other sites

How can I make COIN able to build not only on the ground, but also on big flat roofls (for example, on the roof of city hospital, class Land_A_Hospital) ?

Share this post


Link to post
Share on other sites

and... after Death, COIN doesn't work for me.... :/

please, HELP ME !

Edited by McArcher

Share this post


Link to post
Share on other sites

COIN module is bugged :D

after some attempts of deleting and creating it back, it returns error in .RPT file !

Error in expression <es = _cashValues + [call compile _x];

} foreach _funds;

_cashValuesOld = _logic >

Error position: <foreach _funds;

_cashValuesOld = _logic >

Error foreach: Тип ПоÑледовательноÑÑ‚ÑŒ, ожидаетÑÑ ÐœÐ½Ð¾Ð¶ÐµÑтво

File ca\modules\coin\data\scripts\coin_interface.sqf, line 721

BIS !

I think it's your bug this time :yay:

and this bug is appearing randomly (it can be after first removal of COIN object and then its creation, or after 10th attempt).

in game it results in a clear COIN interface: without money, witout list of buildings and it doesnt respond to Backscape button !!!!! game is hung... only quitting game helps...

BIS, please hear me !

---------- Post added at 06:35 ---------- Previous post was at 06:24 ----------

// mca_players_eh.sqf
// version 1.0
// Evenhandlers for players

RU_player_1 addEventHandler ["Killed", {	deleteVehicle COIN_RU_MHQ; }];
US_player_1 addEventHandler ["Killed", {	deleteVehicle COIN_US_MHQ; }];

// mca_hq_coin_init.sqf
// version 1.0
// COIN init for RU & US MHQs
// server script

// EH RU MHQ
RU_MHQ addEventHandler ["GetOut", {[] execVM "mca_coin_ru_init.sqf"; "respawn_east" setMarkerPos  getPos RU_MHQ; publicVariable "RU_MHQ"}];
RU_MHQ addEventHandler ["Killed", {deleteVehicle COIN_RU_MHQ; "respawn_east" setMarkerPos  getPos RU_MHQ; publicVariable "RU_MHQ"}];
RU_MHQ addEventHandler ["GetIn", {deleteVehicle COIN_RU_MHQ}];

// EH US MHQ
US_MHQ addEventHandler ["GetOut", {[] execVM "mca_coin_us_init.sqf"; "respawn_west" setMarkerPos  getPos US_MHQ; publicVariable "US_MHQ"}];
US_MHQ addEventHandler ["Killed", {deleteVehicle COIN_US_MHQ; "respawn_west" setMarkerPos  getPos US_MHQ; publicVariable "US_MHQ"}];
US_MHQ addEventHandler ["GetIn", {deleteVehicle COIN_US_MHQ}];

// mca_coin_ru_init.sqf

"ConstructionManager" createUnit [ getPos RU_MHQ, group_RU_MHQ, "COIN_RU_MHQ = this;"];
COIN_RU_MHQ synchronizeObjectsAdd [RU_player_1];

COIN_RU_MHQ setvariable ["BIS_COIN_name", "RU MHQ"];
COIN_RU_MHQ setvariable ["BIS_COIN_rules", [RU_player_1]];
COIN_RU_MHQ setvariable ["BIS_COIN_categories", ["Base", "Active Defence", "Passive Defence", "Storage", "Barriers", "Respawn Points"]];
COIN_RU_MHQ setvariable ["BIS_COIN_items",
[
	//--- Class, Category, Cost or [fundsID,Cost], (display name)
	// Buildings for Base construction
	["RU_WarfareBBarracks", "Base", 3000, "Barracks (Field Variant)"],
	["Land_Mil_Barracks_i", "Base", 3500, "Barracks (City Variant)"],
	["RU_WarfareBLightFactory", "Base", 9000, "Light Factory"],
	["RU_WarfareBHeavyFactory", "Base", 25000, "Heavy Factory"],
	["RU_WarfareBAircraftFactory", "Base", 31000, "Aircraft Factory"],
	["RU_WarfareBVehicleServicePoint", "Base", 4000, "Vehicle Service Point"],
	["RU_WarfareBUAVterminal", "Base", 4000, "Radio Terminal"],
	//["PowGen_Big", "Base", 1000, "Diesel Power Generator"],

	["RU_WarfareBFieldhHospital", "Respawn Points", 1000, "Field Hospital"],

	["Land_tent_east", "Storage", 100, "Small Tent"],
	["Land_Ind_Garage01", "Storage", 450, "Small Garage"],
	["Land_Ind_Workshop01_02", "Storage", 475, "Small Workshop"],
	["Land_Barn_W_02", "Storage", 500, "Short Barn"],
	["Land_Ind_Workshop01_04", "Storage", 600, "Old Workshop"],
	["Land_Barn_W_01", "Storage", 700, "Long Barn"],
	["Land_Hangar_2", "Storage", 1000, "Large Hangar w/ Doors"],
	["WarfareBAirport", "Storage", 2500, "Large Hangar"],

	["KORD", "Active Defence", 250, "KORD Minitripod"],
	["KORD_high", "Active Defence", 275, "KORD"],
	["RU_WarfareBMGNest_PK", "Active Defence", 300, "MG Nest (PK)"],	
	["AGS_RU", "Active Defence", 700, "AGS-30"],
	["Igla_AA_pod_East", "Active Defence", 800, "AA IGLA Pod"],
	["Metis", "Active Defence", 800, "Metis AT-13"],
	["ZU23_Ins", "Active Defence", 900, "ZU-23"],
	["2b14_82mm", "Active Defence", 1000, "Podnos 2B14"],
	["D30_RU", "Active Defence", 1900, "D-30"],		
	["SearchLight_RUS", "Active Defence", 100, "Searchlight"],	

	["Land_CamoNet_EAST", "Passive Defence", 50, "Camo Net 1"],
	["Land_CamoNetB_EAST", "Passive Defence", 75, "Camo Net Big"],
	["Land_CamoNetVar_EAST", "Passive Defence", 50, "Camo Net 2"],
	["Land_fort_rampart", "Passive Defence", 50, "Rampart Element"],
	["Land_Hlidac_budka", "Passive Defence", 50, "Sentry Box"],
	["Land_fort_artillery_nest", "Passive Defence", 100, "Rampart (Nest)"],
	["Land_fortified_nest_small", "Passive Defence", 200, "Nest (Small)"],
	["Land_fortified_nest_big", "Passive Defence", 500, "Nest (Big)"],
	["Land_Fort_Watchtower", "Passive Defence", 525, "Fort"],
	["Land_Vysilac_FM", "Passive Defence", 600, "Tower"],
	["Land_Mil_Guardhouse", "Passive Defence", 1000, "Checkpoint"],
	["Land_Mil_ControlTower", "Passive Defence", 2000, "Control Tower"],

	["Fence_corrugated_plate", "Barriers", 20, "Fence 1"],
	["Fence_Ind_long", "Barriers", 20, "Fence 2"],		
	["Fort_RazorWire", "Barriers", 25, "Razor Wire"],
	["Hedgehog", "Barriers", 50, "Hedgehog"],
	["Hhedgehog_concrete", "Barriers", 75, "Small Concrete Hedgehog"],
	["Hhedgehog_concreteBig", "Barriers", 100, "Big Concrete Hedgehog"],
	["Fort_Barricade", "Barriers", 100, "Barricade from Garbage"],
	["Land_fort_bagfence_long", "Barriers", 25, "Land_fort_bagfence_long"],
	["Land_fort_bagfence_corner", "Barriers", 50, "Land_fort_bagfence_corner"],
	["Land_fort_bagfence_round", "Barriers", 50, "Land_fort_bagfence_round"],
	["Land_HBarrier1", "Barriers", 20, "Hesco x1"],
	["Land_HBarrier3", "Barriers", 60, "Hesco x3"],
	["Land_HBarrier5", "Barriers", 100, "Hesco x5"],
	["Land_HBarrier_large", "Barriers", 150, "Big Hesco x4"]

]
];
COIN_RU_MHQ setvariable ["BIS_COIN_funds", "mcti_money_east"];
COIN_RU_MHQ setvariable ["BIS_COIN_fundsDescription", ["R"]];
COIN_RU_MHQ setvariable ["BIS_COIN_areasize", [150, 15]];
COIN_RU_MHQ setvariable ["BIS_COIN_actionCondition", "TRUE"];

COIN is bugged after its re-initialization in GetOut EH. Before GetOut (when I am in MHQ) no line in .RPT there was.

To be more accurate, bug appears when i press enter button on selected COIN build action in menu (so, initializaton seems to be ok, something wrong with coin's script?)

Edited by McArcher

Share this post


Link to post
Share on other sites

Can you please create a CIT ticket.

Attach your mission, and explain how to repro in 1,2,3 bullet points please.

Share this post


Link to post
Share on other sites
Can you please create a CIT ticket.

Attach your mission, and explain how to repro in 1,2,3 bullet points please.

Excuse me, what is "CIT ticket" and what do you mean by "repro in 1,2,3 bullet points"? Sorry, but my English is not perfect.

---------- Post added at 15:53 ---------- Previous post was at 15:00 ----------

ok, I've done this...

http://forums.bistudio.com/showthread.php?p=1524610#post1524610

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  

×