PDA

View Full Version : Construction interface problem



pogoman979
Jun 5 2009, 13:51
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"]];

Moricky
Jun 5 2009, 14:32
Variable 'BIS_COIN_Funds' have to be global variable, not number.

Try:

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

pogoman979
Jun 5 2009, 15:18
omg lol yeah that was it. look what i just did to fix it:


_coin setvariable ["BIS_COIN_onPurchase",

{

private["_cost"];

_coin = _this select 0;

_arr = _coin getVariable "BIS_COIN_items";

_class = _this select 2;

for [{_i=0}, {_i < (count _arr)}, {_i=_i+1}] do

{

_id = (_arr select _i) find _class;

if(_id != -1)exitwith{_cost = ((_arr select _i) select 2)};

};

_cost = call compile format["%1", _cost];
_funds = ((_coin getVariable "BIS_COIN_funds") select 0);
_funds = call compile format["%1", _funds];
_newfunds = _funds - _cost;

_coin setvariable ["BIS_COIN_funds",[format["%1",_newfunds]]];

}];

complete waste of time :facepalm:

also something im either doing wrong or could be an error, according to this page:
http://community.bistudio.com/wiki/Construction_Interface

* BIS_COIN_onPurchase = <code>; - Code which is executed when some building is purchased. Once code is completed, building is constructed. Passed argument is array in format [class,position,direction].

Example: BIS_coin_0 setvariable ["BIS_COIN_onPurchase",{sleep 2}]; - building appears after two seconds
Default value: {}
Note: Warning! System continues only after code is finished.


the variables passed should be [class,position,direction], however when i built a barracks, the variables i received were:
[BIS_coin_0, <NULL-object>, RU_WarfareBBarracks]
ie the logic, null, and the class of the building purchased.

this messed me up for awhile when i was trying to write the above code.

nullsystems
Jun 8 2009, 20:54
Could someone show an example of how to get this working, I entered that into my init.sqf but couldnt figure it out.

pogoman979
Jun 9 2009, 00:48
you need to place a contruction interface module ingame and synchronise it with the units you want to be able to build.
one way of configuring it would be to add this to the init field of the module:
[this] execVM "coinvars.sqf";
and then have the script "coinvars" look like the one in my first post.

remember you will be only be able to build if you are within the set radius of the module (ie _coin setvariable ["BIS_COIN_areasize",[50,20]]; means the radius is 50m). if you are close enough then an action called "construction" should come up.

hope that helps, if really necessary i could create a sample mission :P

stuguy
Jun 9 2009, 02:14
can I change the construction module's camera? I have the code for the camera i want to use...

disableSerialization;
showcinemaborder false;
_camera = "camera" camCreate [4067.33,217.76,600];
_camera cameraEffect ["internal","back"];
titleCut ["","BLACK FADED",0];
titleCut ["","BLACK IN", 2];

showcinemaborder false;
_camera camPrepareTarget [3928.56,219.04,-99817.98];
_camera camPreparePos [4067.33,217.76,200];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;

pogoman979
Jun 9 2009, 02:19
not without creating a new addon, the scripts that load the coin camera are in the modules.pbo.

stuguy
Jun 9 2009, 02:22
not without creating a new addon, the scripts that load the coin camera are in the modules.pbo.

thought so, I will unpack them and sift through the camera options. thanks!

stuguy
Jun 9 2009, 05:11
can I change the construction module's camera? I have the code for the camera i want to use...

disableSerialization;
showcinemaborder false;
_camera = "camera" camCreate [4067.33,217.76,600];
_camera cameraEffect ["internal","back"];
titleCut ["","BLACK FADED",0];
titleCut ["","BLACK IN", 2];

showcinemaborder false;
_camera camPrepareTarget [3928.56,219.04,-99817.98];
_camera camPreparePos [4067.33,217.76,200];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;


not without creating a new addon, the scripts that load the coin camera are in the modules.pbo.

ok, I extracted the coin.sqf and coin_interface.sqf and placed them into my mission\scripts directory. But I can't launch my scripts, even with a BIS_CON_0 = execVM "scripts\coin.sqf", and the interface just hangs. They are merged into a module, so I tried to simulate that by loading coin.sqf as BIS_Coin_0, then added the action to a unit to open the interface script, but no dice. Appart from combining both files into one massive script... how would I just make a new module that I can modify as an addon so I can get the cameras right?

pogoman979
Jun 9 2009, 07:50
how would I just make a new module that I can modify as an addon so I can get the cameras right?

with a fair bit of work :P. i'd say its not really worth it, what are you trying to change about the current camera?

Alex72
Jun 9 2009, 09:38
Excuse my stupidness here as a total script rookie, but is the construction module the only thing that is needed to get to build stuff? Like without money system maybe, and more as a fun thing to test the construction? Or does it always have to have a script loaded to work?

I dont have ARMA2 yet just trying to get some info loaded up before i lay my hands on it. :)

Thanks.

Alex

pogoman979
Jun 9 2009, 10:30
it must have a script loaded that sets all the required variables.

stuguy
Jun 9 2009, 13:07
with a fair bit of work :P. i'd say its not really worth it, what are you trying to change about the current camera?

i created a new coin module addon. the only problem with it is the addon mod replaces the other coin module in the editor.

Simply put, I got the dpo_lhd (lhd spawner) by ArMaTec loaded on Chernarus, and the vehicle Spawner for LHD script by Mondkalb. I know how to change the camera X and Y, so I just lined it up with my LHD in game with some tweaking, setup a commander unit on the boat that addactions the use of the terminal and wallah! working LHD command base. Now, the construction module is way cool. I have been playing with it, and I want to use that with the LHD scripts. But the only problem is that the default camera for the COIN module puts the camera 100 feet underwater. Thus I need to modify the camera for the COIN module.

I want to use the 600 meter camera height and the window position of Monkalb's script, and as the green and red position click boxes as an alternative to BIS' angled camer set 15 meters up, 1 meter in front of the player.

pogoman979
Jun 9 2009, 13:32
yeah i noticed it didnt work over water. they spawned the camera in a rather stupid way:
_camera = "camconstruct" camcreate [position player select 0,position player select 1,15];
when the should've put
_camera = "camconstruct" camcreate [position player select 0,position player select 1,(position player select 2) + 15];

however i doubt its intended use was to build structures from the middle of the ocean :P

stuguy
Jun 9 2009, 14:32
Mondkalb's LHD spawning template rocks, but I love the interface and customization of the COIN module. I just hate the camera. I'm using the ArMaTeC LHD spawner, it loads dpo_lhd in the editor.

I am naming the LHD "LHD"

instead of using player as the position. I want to use LHD, and set the height and rotation of the camera to be equal of that from Mondkalb's script. That way you can see the entire carrier.

He also added clicky buttons that turn red if a unit is detected in the area and you can't spawn units there. I like that idea for MP. So I want to remove the BIS camera pivot and locked screen and bring up the mouse so i can click the buttons from Monkalb's template. But not use his menu for building free aircraft, but rather have the player "buy" the planes and spawn them down on the carrier safely, using input from the COIN module

---------- Post added at 02:32 PM ---------- Previous post was at 01:58 PM ----------

here is where i am having problems...I need help breaking down the COIN_interface.sqf.

I know where the camera is getting created, and how that works. It' the HUD and the vehicle Creation that is messing with me....I want to keep the HUD and the referrences to the COIN.sqf, but I want to change the vehicle creation and camera. I am cutting out some stuff and adding in MBG material...

stuguy
Jun 9 2009, 17:12
I am trying to isolate the HUD from the COIN_interface.sqf. I want to set my own camera in my addon module and overlap the HUD on top. I still want the HUD to reference the materials in COIN.sqf the same. I am getting nowhere messing around with the script, the only thing i can do is raise the camera and rotate it, but I can't change the way it wants to spawn units.

Im shelving this project:

Modify Construction Module to work for the dpo_lhd module by ARMATEC, with elements from the LHD Vehicle Spawner by Mondkalb

monty67t
Jun 13 2009, 18:33
I'm trying to get this construction module setup properly. Basically what I'm trying to do is set it up so the player can build defenses without worrying about money. I don't want the buildings to cost anything or I need the player to have enough money so he can build whatever he wants. I've read the information on the biki and I just don't understand it. I understand how to synch the module with the player and that works and I get the construction interface, but there is nothing there to select to build. You have to list it in these optional parameters for the module somehow. Am I supposed to call these optional parameters in the init of the module or what? Any help is greatly appreciated.

LINK TO BIKI INFO:
http://community.bistudio.com/wiki/Construction_Interface

Thanks,
Monty

stuguy
Jun 14 2009, 01:31
I'm trying to get this construction module setup properly. Basically what I'm trying to do is set it up so the player can build defenses without worrying about money. I don't want the buildings to cost anything or I need the player to have enough money so he can build whatever he wants. I've read the information on the biki and I just don't understand it. I understand how to synch the module with the player and that works and I get the construction interface, but there is nothing there to select to build. You have to list it in these optional parameters for the module somehow. Am I supposed to call these optional parameters in the init of the module or what? Any help is greatly appreciated.

LINK TO BIKI INFO:
http://community.bistudio.com/wiki/Construction_Interface

Thanks,
Monty

what i did was sync the module to myself and also the module to an NPC, or Truck, or object, or something. It lets that NPC or object act as your terminal. when you sync yourself to the module, that only gives that player access to use it. Like you have the car keys to drive the Porsche. What you are missing now is the Porsche. The actual object also linked to your key, or the module. That will allow you to enter "CONSTRUCTION" menu when you get close enough. It will be a new item in your list of actions. This takes a few moments to load at mission start. So be patient. ARMA2 is buggy :P

monty67t
Jun 14 2009, 04:11
Thanks for the help, but I know how to access the interface, that wasn't the problem. But I finally figured out how to set the optional variables I needed and it works now! :)

NS1
Jun 28 2009, 17:34
you need to place a contruction interface module ingame and synchronise it with the units you want to be able to build.
one way of configuring it would be to add this to the init field of the module:
[this] execVM "coinvars.sqf";
and then have the script "coinvars" look like the one in my first post.

remember you will be only be able to build if you are within the set radius of the module (ie _coin setvariable ["BIS_COIN_areasize",[50,20]]; means the radius is 50m). if you are close enough then an action called "construction" should come up.

hope that helps, if really necessary i could create a sample mission :P

I have tried doing this, however upon entering '[this] execVM "coinvars.sqf";' in the init box for the CI Module it comes up with an error "Type script, expected nothing". I also have the convairs.sqf saved in my Arma2\missions\mymission.map is this the correct directory?
Thanks - NS1

-Also I have synced the CI and can get the menu itself up, but I have no credit and no buildings to choose from.

lucilk
Jun 30 2009, 03:34
can someone please give me the script to get full construction with all categories and prices if there is something like this, or at least a script that is close enough to give me all items in construction module, please.

pogoman979
Jun 30 2009, 03:46
try putting

nul = [this] execVM "coinvars.sqf";
in the init field instead.

peskdos
Jul 3 2009, 15:29
i wold really apreciate you could send me a example mission because my english is not so good (im from spain) and i dont understand how to make the construcction module works thanks and wait for your reply

peskdos
Jul 4 2009, 16:25
put that mission folder so i get to know how and where to put the scripts im new in this

mcsheffi
Jul 7 2009, 19:26
I have the construction module up and running and figured out how to change starting funds and objects to be built. How do I get it to increase funds with kills? Not asking someone to do it for me, but would I have to transfer over more scripts from Warfare?

evolve
Jul 8 2009, 08:14
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.

Jedo
Jul 18 2009, 13:43
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?

Impavido
Jul 22 2009, 02:52
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?

Smoot178
Jul 22 2009, 03:07
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?

limtu
Jul 22 2009, 14:06
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

Johne Nelson
Jul 26 2009, 10:32
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

Jedo
Aug 1 2009, 17:13
has anyone figured out how to add buyable units to the base buildings yet?

Alpha13
Aug 10 2009, 03:47
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.)?

kurt211
Aug 10 2009, 06:20
Could someone show an example of how to get this working, I entered that into my init.sqf but couldnt figure it out.

Jedo
Aug 13 2009, 10:43
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.)?

See:

http://forums.bistudio.com/showthread.php?p=1382630#post1382630

PorkyJack
Sep 16 2009, 19:51
I want to make a static machine gun using this, whenever I build it, it's not accesible. What am I doing wrong?

TechnoTerrorist303
Sep 21 2009, 21:56
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.

vincentius
Nov 10 2009, 13:23
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!!

PorkyJack
Nov 12 2009, 17:27
When my guy with the CoIn dies, the CoIn is gone. How can I make it respawn-proof?

DarkestKnight
Dec 1 2009, 03:57
wow none of this seems to be working for me... and whoever writes up the wiki page for this could do much better.

28thCDM
Dec 6 2009, 11:07
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.

McArcher
Dec 21 2009, 21:01
how to create COIN by a script?
and what do I need to script after that? syncronization to a human-owner? or something else?

McArcher
Dec 22 2009, 00:38
creating COIN in Editor and
Name_of_my_COIN_Module synchronizeObjectsAdd [Player_Name]; doesn't help :( (but, manual syncronization works)

McArcher
Dec 22 2009, 11:51
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];

McArcher
Dec 23 2009, 11:44
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) ?

McArcher
Dec 23 2009, 16:44
and... after Death, COIN doesn't work for me.... :/
please, HELP ME !

McArcher
Dec 25 2009, 02:35
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?)

.kju [PvPscene]
Dec 25 2009, 06:20
Can you please create a CIT ticket.
Attach your mission, and explain how to repro in 1,2,3 bullet points please.

McArcher
Dec 25 2009, 11:53
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

.kju [PvPscene]
Dec 25 2009, 12:09
Thank you. :)

A2 Community Issue Tracker (http://dev-heaven.net/wiki/cis)

McArcher
Dec 25 2009, 12:58
btw, I found solution, i placed initialization in the EH not with a "execVM" call of file, but directly pasted code to EH =) it's not so beautiful, but it works. I don't know why... maybe some way of giving access to variables differs?

if the code was like in NWN2, where you could write in C/C++, i wouldnt have such misunderstandings... (in NWN2 very large part of game's code was opened to dev's ))) )

McArcher
Dec 29 2009, 15:21
I've only just noticed two things...

1) COIN doesn't allow to build when trees are close to an object, even if there is enough space to build it. (on flat horisontal land!)

2) EVEN WHEN I CLEAR THIS GROUND OUT OF TREES , IT STILL DOESN'T ALLOW TO BUILD !!! AMAZING LOGICS !!!

How can it be overridden? Another bug of COIN?

---------- Post added at 19:13 ---------- Previous post was at 19:10 ----------

in which file/folder/pbo/.. do COIN's s cripts lie? I want to see its code...

---------- Post added at 19:14 ---------- Previous post was at 19:13 ----------

ca\modules\coin\data\scripts\coin_interface.sqf... maybe somewhere there....?

---------- Post added at 19:21 ---------- Previous post was at 19:14 ----------

it's strange, but don't see \modules\ in unpacked with cpbo "ca.pbo"...

McArcher
Dec 30 2009, 20:59
http://dev-heaven.net/issues/show/7564

Please vote for this.

McArcher
Jan 15 2010, 19:42
How can I use modified (and ripped from game) "coin_interface.sqf" instead of original COIN ?


RU_MHQ addAction ["Build", "scripts\coin\coin_interface.sqf", COIN_RU_MHQ, 1, false];
doesn't help - game hangs on COIN loading screen! (coin_interface.sqf is placed in scripts\coin\ folder of my mission's folder, RU_MHQ exists, COIN_RU_MHQ created by a script and syncronized to player).

spartanx
Apr 15 2010, 14:12
Hello I am new and sing up cause i was grateful for the help from this forum that allowed me to set up the COIN :D. I do have a question and that is can u connect the COIN module to a vehicle so u have to have the vehicle near u to build?

McArcher
Apr 15 2010, 17:58
spartanx, in my mission I made a script, which removes COIN module "attached to a car" after I get into this car, and creates a COIN module after I get out of the car. I think it is much more resource-saving than moving COIN after the vehicle every second/millisecond/...

spartanx
Apr 16 2010, 02:29
spartanx, in my mission I made a script, which removes COIN module "attached to a car" after I get into this car, and creates a COIN module after I get out of the car. I think it is much more resource-saving than moving COIN after the vehicle every second/millisecond/...

Thank you for letting me know this and replying to my question so fast,But how do i apply to my own mission if its ok with you

McArcher
Apr 16 2010, 07:47
spartanx,
you can download my MCTI and watch into its code (unpack .pbo file and watch the scripts inside it). I don't have much time to help you at the moment.

ArmAIIholic
Sep 6 2010, 13:33
-- RE-SYNC COIN SOLUTION FOR F2 --
Hey Fer and F2 users,
here is some temporary solution for re-sync COIN after the player is revived / respawned, I found it here thanx to McArcher (http://forums.bistudio.com/showthread.php?t=73769&page=5), but I modified it a little bit, the way I felt it would work better.

I've created GameLogic object and in init line I've put this:

group_MyCOIN = createGroup west;
"ConstructionManager" createUnit [getPos p1, group_MyCOIN, "MyCOIN = this;"];
MyCOIN synchronizeObjectsAdd [p1];
By the way this reference (http://community.bistudio.com/wiki/synchronizeObjectsAdd) is wrong.

The code above creates a group and places Construction Manager as a unit. Be sure that you have center already created, if you don't have use this:

Side_MyCOIN = createCenter west;

Now, I've made a trigger that is called by radio and player can call it to re-sync with COIN module like this:

null = [] spawn
{
deleteVehicle MyCOIN;
sleep 5;
deleteGroup group_MyCOIN;
sleep 5;
group_MyCOIN = createGroup west;
"ConstructionManager" createUnit [getPos p1, group_MyCOIN, "MyCOIN = this;"];
MyCOIN synchronizeObjectsAdd [p1];
null = [MyCOIN,"p1",1,500] execVM "f\common\f_COINpresets.sqf";
};
This code will delete old unit "MyCOIN", then it will delete old group. And the process repeats -- creating new group and creating new unit and sync with player p1.

By empirical testings I've found that you cannot call only MyCOIN synchronizeObjectsAdd [p1]; , but it has to be connected i.e. in the same script with commands for creating group and creating unit (it is a block of commands).
Moreover, I've found that for some reason this script needs time to delete the unit and to delete the group, so 10 sec seamed reasonable and showed to be good during multiple testings.

After re-sync player will have 0 funds, therefore the last command will add some small amount.
This is not the perfect solution, but it has advantage --- it forces players to stay alive and to protect the leader, so that they don't loose funds.

I hope it will help F2 designers to come up with better solution that will be coupled with killed EH and automatic re-sync after revive / respawn. For me this script is doing a job very well.

Cheers

Thanx McArcher for testings, here is my contribution.

armymanj
Nov 12 2010, 08:02
54321

jespejo
Feb 2 2011, 21:25
I have a working COIN module, owrks great with buildings and empty veh and weapons. How do use the module to create manned tanks and static weapons? Or do I have to have a seperate script in the construction zone to create men and add to weapons? But then again, how do I identify a weapons or tank without a name? Very confusing.

ArmAIIholic
Feb 5 2011, 11:09
I can only say that my example was for COIN that is activated through F2 template.

Step one : visit http://www.ferstaberinde.com/f2/en/index.php?title=Construction_Interface_(COIN)_Presets and read all.

Step two : create COIN module, but the way I explained !!! IN THE EDITOR

Step three : activate it through F2 (I mean edit init.sqf) as explained at the link above :
e.g. [MyCOIN,"MyEngineer",2,5000] execVM "f\common\f_COINpresets.sqf";

Step four : use my method (via radio call to re-sync with player).

NOT USING F2 :
Make COIN through sqf and you can again re-sync it with method I showed.
The trick is that no bug will appear in McArcher's example (in my experience, I did a lot of testing) if you put sleep 5 delays, that is the trick.

Just an example :

null = [] spawn
{
deleteVehicle MyCOIN;
sleep 5;
deleteGroup group_MyCOIN;
sleep 5;
group_MyCOIN = createGroup west;
"ConstructionManager" createUnit [getPos p1, group_MyCOIN, "MyCOIN = this;"];
MyCOIN synchronizeObjectsAdd [p1];
repeat here everything again (the same way like you were creating COIN the first time
};